Malicious code in modern-localization (npm)
The npm package modern-localization contained malicious code that fetches and executes arbitrary JavaScript from a remote jsonbin.io endpoint on server-side require, with no integrity verification. The payload is executed with full Node.js privileges via Function() or child_process.fork().
- Disclosed
- Last updated
- Blast radius
- Any Node.js application that requires modern-localization at runtime executes arbitrary remote code with full Node privileges.
- Ecosystems
- Attack vectors
- Affected entities
- modern-localizationnpm package
The npm package modern-localization was found to contain malicious code that executes on server-side require. The package's main entry point runs a top-level async IIFE named syncLanguageSystem that performs an HTTP GET request to hardcoded jsonbin.io endpoints (https://api.jsonbin.io/v3/b/6a764665da38895dfec7cd5d and https://api.jsonbin.io/v3/b/6a718a58da38895dfeb6e2ed) and executes the returned string as JavaScript with full Node privileges.
The malicious behavior is implemented in two ways: utils.js passes the fetched payload into new Function('require', payload) with the real require reference, and index.js writes the fetched payload to a temporary file and invokes it via child_process.fork(). The destination is a third-party mutable key-value store controlled by the bin owner, with no pinning, hash verification, or signature validation.
The attack is disguised as a language synchronization feature through identifier and log naming ('syncLanguageSystem', 'lang_source', 'LANG_PASS_KEY'), but a localization library has no legitimate need to fetch and execute arbitrary JavaScript; translations are static data. Any Node.js application that requires this package at runtime is compromised with arbitrary code execution.
The incident was identified by the OpenSSF malicious-packages project.
Indicators of compromise
- Packages
- modern-localization
- Domains
- api.jsonbin.io
Remediation
- Immediately remove modern-localization from all dependencies and package.json files
- Audit all Node.js applications that may have required this package for signs of compromise or data exfiltration
- Review npm audit logs and deployment records to identify when the malicious version was installed
- Replace modern-localization with a trusted alternative localization library or implement localization functionality directly
- Consider using npm package lock files and integrity verification to prevent installation of compromised packages in the future
- Monitor for any suspicious outbound HTTP connections to jsonbin.io or similar external endpoints in production environments
Sources
- GitHub Advisory GHSA-qf2g-q6rj-77q5 · GitHub Advisory Database
Cite this entry
"Malicious code in modern-localization (npm)." supplychainattack.org, Supply Chain Attack Incident Catalog. Disclosed August 8, 2026; last updated August 8, 2026. https://supplychainattack.org/incident/malicious-code-in-modern-localization-npm-nt9kzc
Suggest a correction
Found an error or have a newer source? Corrections to factual errors take priority over new entries.
Related incidents
- containedcritical
Malicious code in 3-buildsight-web (npm)
The npm package 3-buildsight-web contains malicious code that fetches and executes arbitrary JavaScript from a remote Bitbucket URL on module load, granting full page privileges to an unverified third party.
npmCompromised package - resolvedcritical
Malicious code in @usaa-grp-personal-profile/personal-profile-common (npm)
Malicious package @usaa-grp-personal-profile/personal-profile-common version 999.0.0 published to public npm as a dependency-confusion attack targeting an organization's internal registry. The package contains preinstall and postinstall hooks that exfiltrate hostname, username, and working directory to an attacker-controlled OAST endpoint on every install.
npmDependency confusionCompromised package - resolvedcritical
Malicious code in create-coin (npm)
create-coin@20.1.1 on npm contained malicious postinstall code that collected sensitive environment variables, credentials, and host reconnaissance data. The package impersonated an esbuild platform build and exfiltrated data to a hardcoded endpoint.
npmCompromised packageTyposquatting - resolvedcritical
Malicious code in @syncraft-labs/vue (npm)
The npm package @syncraft-labs/vue version 0.4.1 contained malicious obfuscated code in its ESM build that implements a blockchain-hosted C2 dropper (EtherHiding pattern), enabling remote code execution on any consumer importing the package.
npmCompromised package