MAL-2026-6994: Malicious code in chai-presentation (npm)
The npm package 'chai-presentation' versions 0.0.1, 0.0.2, 0.0.3, and 0.0.4 contains malicious code that executes remote JavaScript code during import. It fetches code from external URLs and executes it with full Node.js privileges, enabling arbitrary code execution on the host machine. The package impersonates a chai plugin but includes unrelated dependencies and misleading documentation to lure victims. No official patch or fix is currently available.
AI Analysis
Technical Summary
The 'chai-presentation' npm package contains malicious functionality triggered on require(). Its index.js performs an HTTPS GET request to a remote JSON paste URL and executes the 'cookie' field content as JavaScript code using Function constructor with the host's require function, granting full Node.js execution rights. Additionally, it spawns a detached Node child process that polls another remote URL and executes code from the response token if a 404 is returned. The package masquerades as a chai plugin but includes unrelated dependencies and misleading README content, indicating an impersonation attack. This results in two independent remote code execution vectors at import time. The affected versions are 0.0.1 through 0.0.4.
Potential Impact
Successful import of this package results in immediate arbitrary code execution with full Node.js privileges on the host machine. This can lead to complete system compromise, data theft, or further malicious activity. The malicious code is fetched dynamically from attacker-controlled URLs, allowing flexible and evolving payloads. There is no indication of known exploits in the wild yet, but the risk is critical due to the nature of remote code execution.
Mitigation Recommendations
No official patch or remediation is currently available for this malicious package. Users should immediately remove 'chai-presentation' versions 0.0.1, 0.0.2, 0.0.3, and 0.0.4 from their dependencies and avoid installing it. Verify package authenticity before installation and prefer official, well-maintained chai plugins. Monitor for vendor advisories or updates regarding this package for any future remediation.
MAL-2026-6994: Malicious code in chai-presentation (npm)
Description
The npm package 'chai-presentation' versions 0.0.1, 0.0.2, 0.0.3, and 0.0.4 contains malicious code that executes remote JavaScript code during import. It fetches code from external URLs and executes it with full Node.js privileges, enabling arbitrary code execution on the host machine. The package impersonates a chai plugin but includes unrelated dependencies and misleading documentation to lure victims. No official patch or fix is currently available.
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-presentation' npm package contains malicious functionality triggered on require(). Its index.js performs an HTTPS GET request to a remote JSON paste URL and executes the 'cookie' field content as JavaScript code using Function constructor with the host's require function, granting full Node.js execution rights. Additionally, it spawns a detached Node child process that polls another remote URL and executes code from the response token if a 404 is returned. The package masquerades as a chai plugin but includes unrelated dependencies and misleading README content, indicating an impersonation attack. This results in two independent remote code execution vectors at import time. The affected versions are 0.0.1 through 0.0.4.
Potential Impact
Successful import of this package results in immediate arbitrary code execution with full Node.js privileges on the host machine. This can lead to complete system compromise, data theft, or further malicious activity. The malicious code is fetched dynamically from attacker-controlled URLs, allowing flexible and evolving payloads. There is no indication of known exploits in the wild yet, but the risk is critical due to the nature of remote code execution.
Mitigation Recommendations
No official patch or remediation is currently available for this malicious package. Users should immediately remove 'chai-presentation' versions 0.0.1, 0.0.2, 0.0.3, and 0.0.4 from their dependencies and avoid installing it. Verify package authenticity before installation and prefer official, well-maintained chai plugins. Monitor for vendor advisories or updates regarding this package for any future remediation.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-6994
- Osv Schema Version
- 1.7.4
- Aliases
- []
- Ecosystems
- ["npm"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a50ba9768715ace435825b3
Added to database: 07/10/2026, 09:25:43 UTC
Last enriched: 07/10/2026, 10:10:29 UTC
Last updated: 07/10/2026, 10:10:29 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.
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.