mcq-session (npm) · Malicious Code
Affects mcq-sessionSource GCVE Database
Malicious package : remove mcq-session and rotate any secrets on hosts that installed it.
Data as of 21 Aug 2026, 14:42 UTC
Malicious package
Published to npm · OSV MAL-2026-14347
What to do
Remove mcq-session 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 |
|---|---|---|
| npmmcq-session | 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 mcq-session npm package versions 1.0.3 and 1.0.4 contain malicious code that executes a hidden payload. When imported, the package runs an asynchronous function that reads an external file outside the package directory, decrypts it using a hardcoded DES key, and executes the decrypted JavaScript code via a detached Node.js subprocess. This behavior bypasses static code inspection by encrypting the payload and disguising the loader with misleading identifiers. The payload file is attacker-controlled and resides alongside the host application, enabling remote code execution without user consent or verification.