Malicious code in chai-jsonss (npm)
The npm package chai-jsonss contained malicious code that fetches and executes attacker-controlled JavaScript on import. The package masquerades as a chai-related library but performs only remote code execution via a hidden API endpoint.
- Disclosed
- Last updated
- Blast radius
- Any project that imported chai-jsonss; arbitrary code execution on install/import.
- Ecosystems
- Attack vectors
- Affected entities
- chai-jsonssnpm package containing malicious code
The npm package chai-jsonss was published with malicious code embedded in its index.js entry point. On import, the package invokes a postCallers() function that decodes a base64-encoded URL from lib/const.js, resolving to https://1uznbx.s.gy/7xdQmt.\n\nThe package then fetches the response via axios, base64-decodes the response.data.model field, and passes the result to new Function(require), executing arbitrary attacker-controlled JavaScript in the importing process. The malicious URL is obfuscated as a DEV_API_KEY field on a fake process.env-shaped local module, and the payload URL points to a mutable remote resource controlled by the attacker.\n\nThe package name resembles the legitimate chai testing library but contains no chai-related functionality. Its sole import-time behavior is to fetch and execute remote code, making it a pure malware delivery mechanism.\n\nThe incident was identified by Amazon Inspector and credited to the OpenSSF malicious-packages repository.
Indicators of compromise
- Packages
- chai-jsonss
- Domains
- 1uznbx.s.gy
Remediation
- Remove chai-jsonss from all dependencies immediately
- Audit all projects that imported chai-jsonss for signs of compromise or unauthorized activity
- Review npm audit logs and package-lock.json files for presence of chai-jsonss
- If chai-jsonss was installed, assume the system may be compromised and perform a security review
- Use npm to uninstall the package: npm uninstall chai-jsonss
- Consider using npm security tools to scan for similar typosquatting or malicious packages
Sources
- GitHub Advisory GHSA-xp6h-f5rv-v8fp · GitHub Advisory Database
Cite this entry
"Malicious code in chai-jsonss (npm)." supplychainattack.org, Supply Chain Attack Incident Catalog. Disclosed August 10, 2026; last updated August 10, 2026. https://supplychainattack.org/incident/malicious-code-in-chai-jsonss-npm-1n8186
Suggest a correction
Found an error or have a newer source? Corrections to factual errors take priority over new entries.
Related incidents
- containedcritical
Malicious code in bcc-design-icons (npm)
bcc-design-icons@9999.0.0 on npm contains malicious postinstall script that exfiltrates hostname and package name to attacker-controlled IP 91.201.215.48:8000. The package lacks expected icon-library functionality and exhibits characteristics of a dependency-confusion attack targeting internal/private npm installers.
npmDependency confusionCompromised package - resolvedcritical
Malicious code in core-tailwindcss-utility (npm)
core-tailwindcss-utility, an npm package falsely advertised as a Tailwind CSS utility, contains malicious code that fetches and executes arbitrary Node.js code from a remote C2 server. The package includes suspicious dependencies for credential theft and remote communication.
npmCompromised package - activecritical
Malware in sui-move-graphql
Malware was discovered in the npm package sui-move-graphql. Systems with this package installed or running should be considered fully compromised, requiring immediate rotation of all secrets and keys from a different computer.
npmCompromised package - resolvedcritical
Malware in ulebkit
The npm package ulebkit contained malware that provided full system compromise to attackers. Any computer with the package installed or running should be considered fully compromised.
npmCompromised package