Malicious code in chai-as-deployer (npm)
The npm package 'chai-as-deployer' versions 2.3.5 and 2.3.6 contains malicious code disguised as a harmless chai plugin. Instead of legitimate functionality, it includes a large obfuscated payload that executes child processes and makes outbound HTTP requests immediately upon import. The package metadata is generic and misleading, and the code is designed to steal or load malicious content at import time without user interaction.
AI Analysis
Technical Summary
The 'chai-as-deployer' npm package, specifically versions 2.3.5 and 2.3.6, is a malicious package that impersonates a chai plugin but contains no legitimate functionality. Its tarball includes unrelated documentation and a no-op Express middleware, but crucially it unconditionally requires a heavily obfuscated ~3.5MB bundle at the module's top level. This obfuscated code contains references to 'require', 'exec', 'spawn', and 'axios', indicating it executes child processes and performs outbound HTTP requests. This behavior triggers immediately upon importing the package, making it an import-time stealer or loader. The author metadata is generic and unrelated to the package's claimed purpose, further indicating malicious intent.
Potential Impact
Any project that imports 'chai-as-deployer' versions 2.3.5 or 2.3.6 will execute malicious code automatically, potentially leading to unauthorized code execution, data exfiltration, or system compromise via child process execution and network communication. This occurs without any explicit action beyond importing the package, increasing the risk of unnoticed compromise.
Mitigation Recommendations
No official patch or remediation is currently documented for this package. Users should immediately remove 'chai-as-deployer' versions 2.3.5 and 2.3.6 from their dependencies and avoid installing or importing this package. Consider auditing dependency trees for this package and replacing it with trusted alternatives. Monitor for updates from the npm registry or security advisories for any official remediation or takedown.
Malicious code in chai-as-deployer (npm)
Description
The npm package 'chai-as-deployer' versions 2.3.5 and 2.3.6 contains malicious code disguised as a harmless chai plugin. Instead of legitimate functionality, it includes a large obfuscated payload that executes child processes and makes outbound HTTP requests immediately upon import. The package metadata is generic and misleading, and the code is designed to steal or load malicious content at import time without user interaction.
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The 'chai-as-deployer' npm package, specifically versions 2.3.5 and 2.3.6, is a malicious package that impersonates a chai plugin but contains no legitimate functionality. Its tarball includes unrelated documentation and a no-op Express middleware, but crucially it unconditionally requires a heavily obfuscated ~3.5MB bundle at the module's top level. This obfuscated code contains references to 'require', 'exec', 'spawn', and 'axios', indicating it executes child processes and performs outbound HTTP requests. This behavior triggers immediately upon importing the package, making it an import-time stealer or loader. The author metadata is generic and unrelated to the package's claimed purpose, further indicating malicious intent.
Potential Impact
Any project that imports 'chai-as-deployer' versions 2.3.5 or 2.3.6 will execute malicious code automatically, potentially leading to unauthorized code execution, data exfiltration, or system compromise via child process execution and network communication. This occurs without any explicit action beyond importing the package, increasing the risk of unnoticed compromise.
Mitigation Recommendations
No official patch or remediation is currently documented for this package. Users should immediately remove 'chai-as-deployer' versions 2.3.5 and 2.3.6 from their dependencies and avoid installing or importing this package. Consider auditing dependency trees for this package and replacing it with trusted alternatives. Monitor for updates from the npm registry or security advisories for any official remediation or takedown.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-13700
- Osv Schema Version
- 1.7.4
- Aliases
- []
- Ecosystems
- ["npm"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a79f0c4bf8831d539f5dc8a
Added to database: 08/10/2026, 15:39:48 UTC
Last enriched: 08/10/2026, 15:42:14 UTC
Last updated: 08/10/2026, 15:42:53 UTC
Views: 2
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.