cors-security (npm) · Malicious Code
Affects cors-securitySource GCVE Database
Malicious package : remove cors-security and rotate any secrets on hosts that installed it.
Data as of 5 Aug 2026, 17:20 UTC
Malicious package
Published to npm · OSV MAL-2026-12357
What to do
Remove cors-security from every project, lockfile and image that pulls it in. Treat any host that installed it as compromised: rotate the credentials, tokens and keys it could read, from a clean machine.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| npmcors-security | Affected
| Fixed in– |
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
Description
The npm package cors-security version 1.0.1 contains malicious code that executes attacker-controlled JavaScript code within the consumer's Node.js process. This occurs because the package's CommonJS entry point fetches code from a hardcoded remote host (workconfig.vercel.app) with TLS verification disabled and executes it with access to the require function. This behavior is unrelated to the package's advertised functionality and is only present in the CommonJS variant.