MAL-2026-12174 Malicious code in cors-update (npm)

Malicious package Published
Package
cors-update
Registry
npm

What is MAL-2026-12174?

MAL-2026-12174 is a malicious package in cors-update, published on 5 Aug 2026.

Official description

Package impersonates the widely-used cors Express middleware. lib/index.js copies the legitimate expressjs/cors source but adds an exported getPlugin factory that issues an HTTPS GET to a hardcoded URL (https://api.avax-test.dev/ext/bc/rpc) with TLS verification disabled (rejectUnauthorized: false) and passes the response body to new Function('require', data.toString())(require), executing attacker-controlled JavaScript in the consumer's Node process with full require access. Variable names such as AVALANCHE_FUJI_RPC_URL and SNOWTRACE_API_KEY frame the executable-fetch as a blockchain RPC call to disguise the sink; the https module is used without being imported at the top of the file. Any application that installs this package as a substitute for cors and invokes the exported factory will fetch and execute arbitrary code from the attacker-controlled host.

What should I do about MAL-2026-12174?

Remove the package from your dependencies and lockfiles, then rotate any secrets on machines where it was installed.

Sources

Is MAL-2026-12174 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free