Malicious code in express-rate-controller (npm)
The npm package express-rate-controller contained malicious code that fetches and executes arbitrary JavaScript from a remote endpoint (api.avax-test.dev) with full require access. The malicious export (getPlugin()) was hidden from ESM and TypeScript consumers by only appearing in the CommonJS build.
- Disclosed
- Last updated
- Blast radius
- Any npm consumer that requires express-rate-controller and invokes getPlugin() or iterates the exported api object.
- Ecosystems
- Attack vectors
- Affected entities
- express-rate-controllernpm package with malicious code in CommonJS build
The npm package express-rate-controller was published with a misleading name and description (claiming to be an SVG utilities library with a CLI named svgcraft) but contained malicious code in its CommonJS build.\n\nThe src/index.cjs file exports a getPlugin() function that performs an HTTPS GET request to https://api.avax-test.dev/ext/bc/rpc with TLS verification disabled (rejectUnauthorized: false). The response body is then executed as JavaScript using new Function('require', data)(require), granting the attacker full require access to the consuming application.\n\nThe malicious export was intentionally hidden from ESM and TypeScript consumers: the index.mjs and index.d.ts files do not declare getPlugin(), making the attack invisible to typed and ESM-based tooling. Any consumer that require()s the package and either directly invokes getPlugin() or iterates the exported api object would execute attacker-controlled code.\n\nThe incident was identified and credited to the OpenSSF malicious-packages project.
Indicators of compromise
- Packages
- express-rate-controller
- Domains
- api.avax-test.dev
Remediation
- Remove express-rate-controller from all dependencies immediately
- Audit all applications that have installed this package for signs of compromise
- Review npm audit logs and package-lock.json files for any versions of express-rate-controller
- If the package was installed, assume the system may be compromised and perform a full security review
- Use npm to check for and remove any malicious versions from your project
- Monitor for any suspicious outbound HTTPS connections to api.avax-test.dev
Sources
- GitHub Advisory GHSA-qm8f-pmrw-jjhh · GitHub Advisory Database
Cite this entry
"Malicious code in express-rate-controller (npm)." supplychainattack.org, Supply Chain Attack Incident Catalog. Disclosed August 5, 2026; last updated August 5, 2026. https://supplychainattack.org/incident/malicious-code-in-express-rate-controller-npm-jztn1r
Suggest a correction
Found an error or have a newer source? Corrections to factual errors take priority over new entries.
Related incidents
- resolvedcritical
Malicious code in rust-testing-utils (npm)
The npm package rust-testing-utils contained malicious code that impersonates the pino logger and executes remotely-fetched code with arbitrary privileges. The package spawns a child process that decodes a hardcoded URL, fetches attacker-controlled content, and executes it via Function constructor with full module-loading capability.
npmCompromised packageMalicious commit - containedcritical
Malicious code in stillm4ddpocs-demo-sprocket (npm)
The npm package stillm4ddpocs-demo-sprocket version 999.9.12 contains malicious code that exfiltrates system and project metadata via multiple channels (HTTPS, HTTP, and DNS) to a hardcoded callback host. The package uses a high version number to exploit dependency-confusion attacks against organizations with internal packages of the same name.
npmCompromised packageDependency confusion - containedcritical
Malicious code in @syncraft-labs/react (npm)
The npm package @syncraft-labs/react contained obfuscated malicious code in its ESM distribution that implements the EtherHiding pattern, fetching and executing arbitrary code from an Ethereum smart contract via RPC endpoints. The tampering occurred post-build in the dist/index.js artifact.
npmCompromised package - containedcritical
Malware in hydration-dim-kit
Malware was discovered in the npm package hydration-dim-kit. Any computer with this package installed or running should be considered fully compromised. All secrets and keys must be rotated immediately from a different computer.
npmCompromised package