MAL-2026-10046: Malicious code in chai-as-smart (npm)
The npm package chai-as-smart version 2.3.5 contains malicious code that executes upon requiring the package. It spawns a detached background process that decodes a hidden URL and sends the full environment variables of the host process to a remote attacker-controlled endpoint. The response from this endpoint is executed as code with full access to Node.js require, enabling arbitrary code execution. This behavior exposes sensitive information such as tokens, cloud credentials, and CI secrets, and allows full remote code execution on the affected machine.
AI Analysis
Technical Summary
The malicious npm package chai-as-smart (version 2.3.5) includes code that, when required, launches a background script which decodes a base64-encoded URL and sends the entire process environment variables to this remote endpoint using axios. The response from the endpoint is dynamically executed as JavaScript code with access to the Node.js require function, granting the attacker arbitrary code execution capabilities within the Node.js process. The package masquerades as a pino-style logger middleware to deceive users. This results in exfiltration of sensitive environment data and enables full remote code execution on any system that installs or imports this package.
Potential Impact
Any system that installs or imports chai-as-smart version 2.3.5 is compromised by exfiltration of environment variables, which may include sensitive tokens, cloud credentials, and CI secrets. Additionally, the attacker gains the ability to execute arbitrary code within the Node.js process, potentially leading to full system compromise.
Mitigation Recommendations
No official patch or remediation is currently available for this malicious package. Users should immediately remove chai-as-smart version 2.3.5 from their projects and dependency trees. Avoid installing or requiring this package. Review and rotate any potentially exposed credentials or secrets that may have been compromised. Monitor for any unauthorized activity resulting from this compromise.
MAL-2026-10046: Malicious code in chai-as-smart (npm)
Description
The npm package chai-as-smart version 2.3.5 contains malicious code that executes upon requiring the package. It spawns a detached background process that decodes a hidden URL and sends the full environment variables of the host process to a remote attacker-controlled endpoint. The response from this endpoint is executed as code with full access to Node.js require, enabling arbitrary code execution. This behavior exposes sensitive information such as tokens, cloud credentials, and CI secrets, and allows full remote code execution on the affected machine.
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 malicious npm package chai-as-smart (version 2.3.5) includes code that, when required, launches a background script which decodes a base64-encoded URL and sends the entire process environment variables to this remote endpoint using axios. The response from the endpoint is dynamically executed as JavaScript code with access to the Node.js require function, granting the attacker arbitrary code execution capabilities within the Node.js process. The package masquerades as a pino-style logger middleware to deceive users. This results in exfiltration of sensitive environment data and enables full remote code execution on any system that installs or imports this package.
Potential Impact
Any system that installs or imports chai-as-smart version 2.3.5 is compromised by exfiltration of environment variables, which may include sensitive tokens, cloud credentials, and CI secrets. Additionally, the attacker gains the ability to execute arbitrary code within the Node.js process, potentially leading to full system compromise.
Mitigation Recommendations
No official patch or remediation is currently available for this malicious package. Users should immediately remove chai-as-smart version 2.3.5 from their projects and dependency trees. Avoid installing or requiring this package. Review and rotate any potentially exposed credentials or secrets that may have been compromised. Monitor for any unauthorized activity resulting from this compromise.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-10046
- Osv Schema Version
- 1.7.4
- Aliases
- []
- Ecosystems
- ["npm"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a50bac068715ace43587753
Added to database: 07/10/2026, 09:26:24 UTC
Last enriched: 07/10/2026, 10:22:04 UTC
Last updated: 07/10/2026, 10:22:04 UTC
Views: 3
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.