Malicious code in mcq-session (npm)
The npm package mcq-session contained malicious code that executes arbitrary JavaScript on import. The loader reads an encrypted payload from a host application's public assets directory, decrypts it using a hardcoded key, and executes it as a subprocess with no integrity checks.
- Disclosed
- Last updated
- Blast radius
- Any application that imports mcq-session
- Ecosystems
- Attack vectors
- Affected entities
- mcq-sessionnpm package
The mcq-session npm package contained a top-level async IIFE that executes automatically on require() or import. The malicious code reads a file from a path outside the package root (../../../../public/logo.ico), targeting a host application's public assets directory.\n\nThe loader uses DES encryption with a hardcoded password ('bf497c0b9cee') and CryptoJS to decrypt the payload, then pipes the decrypted plaintext into a detached Node.js subprocess via stdin. The decrypted content is executed as arbitrary JavaScript with no signature verification, integrity checks, or user confirmation.\n\nThe attack is disguised with benign-sounding identifiers such as 'readLogoIco' and 'ThetaSDK initialization'. Since the symmetric key is hardcoded in the package, the encryption serves only to evade static code analysis. The out-of-package file path indicates the actual payload is dropped separately during installation, making it attacker-controlled from the installer's perspective.\n\nThis incident was identified by the OpenSSF malicious-packages project and reported via GitHub Security Advisory GHSA-7hm6-5mgc-qm2c.
Remediation
- Remove mcq-session from all projects immediately
- Audit all systems that installed mcq-session for unauthorized processes or modifications
- Review application logs for suspicious subprocess execution or file access patterns
- Check for unexpected files in public asset directories (particularly logo.ico or similar)
- Regenerate any credentials or secrets that may have been exposed
- Consider the possibility of lateral movement or persistence mechanisms left by the malicious code
Sources
- GitHub Advisory GHSA-7hm6-5mgc-qm2c · GitHub Advisory Database
Cite this entry
"Malicious code in mcq-session (npm)." supplychainattack.org, Supply Chain Attack Incident Catalog. Disclosed August 21, 2026; last updated August 21, 2026. https://supplychainattack.org/incident/malicious-code-in-mcq-session-npm-12y532
Suggest a correction
Found an error or have a newer source? Corrections to factual errors take priority over new entries.
Related incidents
- containedcritical
Malware in svelte-dim-kit
The npm package svelte-dim-kit was found to contain malware, potentially giving attackers full control of affected systems. All systems with this package installed should be considered compromised and secrets/keys rotated immediately from a different computer.
npmCompromised package - 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
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 - resolvedcritical
Malicious code in stillm4ddpocs-rtest-bravo (npm)
The npm package stillm4ddpocs-rtest-bravo contained malicious code in its preinstall script that automatically executed during installation, collecting system information and internal package metadata and exfiltrating it to a third-party Interactsh collector via HTTPS and DNS tunneling.
npmCompromised package