MAL-2026-10043: Malicious code in chai-as-modified (npm)
The npm package 'chai-as-modified' version 6.0.4 is identified as malicious. It masquerades as a variant of the legitimate 'chai-as-promised' plugin but contains code that attempts to spawn a detached Node.js subprocess running a hidden script, creating an out-of-band execution channel unrelated to its advertised functionality. The package includes decoy content copied from an unrelated project and a README copied from another source to mislead users. The referenced payload script is missing in this version, causing the subprocess to error out, which may indicate a staged attack or a payload delivered in subsequent updates.
AI Analysis
Technical Summary
The 'chai-as-modified' npm package (version 6.0.4) is a malicious package designed to impersonate the widely-used 'chai-as-promised' plugin. Its main exported function, intended for use with 'chai.use(...)', launches a detached and unreferenced Node.js subprocess executing a sibling script './lib/initializeCaller.js'. This subprocess runs independently of the parent process, enabling covert execution outside the normal test runner lifecycle. The package includes decoy source code copied from the 'pino' project and a README copied from 'pinojs/pino' to disguise its true intent. The actual payload script is missing in this tarball, causing the subprocess to fail, consistent with a possible staged attack or payload delivery via subsequent package versions.
Potential Impact
If executed, the detached subprocess could enable unauthorized code execution outside the normal application context, potentially leading to system compromise or persistence. However, in this specific version (6.0.4), the payload script is missing, causing the subprocess to error out and limiting immediate impact. The presence of an out-of-band execution channel represents a significant security risk if the payload is delivered in future versions or via sibling packages.
Mitigation Recommendations
No official patch or fix is currently available. Users should avoid installing or using the 'chai-as-modified' package, especially version 6.0.4. Verify package authenticity and source before installation. Monitor for updates from trusted sources regarding remediation or removal of this malicious package from npm repositories. Since this is a malicious package impersonating a legitimate one, prefer using the official 'chai-as-promised' package or other trusted alternatives.
MAL-2026-10043: Malicious code in chai-as-modified (npm)
Description
The npm package 'chai-as-modified' version 6.0.4 is identified as malicious. It masquerades as a variant of the legitimate 'chai-as-promised' plugin but contains code that attempts to spawn a detached Node.js subprocess running a hidden script, creating an out-of-band execution channel unrelated to its advertised functionality. The package includes decoy content copied from an unrelated project and a README copied from another source to mislead users. The referenced payload script is missing in this version, causing the subprocess to error out, which may indicate a staged attack or a payload delivered in subsequent updates.
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-modified' npm package (version 6.0.4) is a malicious package designed to impersonate the widely-used 'chai-as-promised' plugin. Its main exported function, intended for use with 'chai.use(...)', launches a detached and unreferenced Node.js subprocess executing a sibling script './lib/initializeCaller.js'. This subprocess runs independently of the parent process, enabling covert execution outside the normal test runner lifecycle. The package includes decoy source code copied from the 'pino' project and a README copied from 'pinojs/pino' to disguise its true intent. The actual payload script is missing in this tarball, causing the subprocess to fail, consistent with a possible staged attack or payload delivery via subsequent package versions.
Potential Impact
If executed, the detached subprocess could enable unauthorized code execution outside the normal application context, potentially leading to system compromise or persistence. However, in this specific version (6.0.4), the payload script is missing, causing the subprocess to error out and limiting immediate impact. The presence of an out-of-band execution channel represents a significant security risk if the payload is delivered in future versions or via sibling packages.
Mitigation Recommendations
No official patch or fix is currently available. Users should avoid installing or using the 'chai-as-modified' package, especially version 6.0.4. Verify package authenticity and source before installation. Monitor for updates from trusted sources regarding remediation or removal of this malicious package from npm repositories. Since this is a malicious package impersonating a legitimate one, prefer using the official 'chai-as-promised' package or other trusted alternatives.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-10043
- Osv Schema Version
- 1.7.4
- Aliases
- []
- Ecosystems
- ["npm"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a50bab068715ace4358591a
Added to database: 07/10/2026, 09:26:08 UTC
Last enriched: 07/10/2026, 10:18:12 UTC
Last updated: 07/10/2026, 10:18:12 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.