Malicious code in chai-as-promised-plus (npm)
The npm package 'chai-as-promised-plus' version 6.1.3 is a typosquatting malicious package that mimics the legitimate 'chai-as-promised' assertion helper. It contains a large obfuscated JavaScript payload that replaces the module exports at load time, executing attacker-controlled code within the consumer's Node.js process. This behavior is characteristic of supply-chain attacks where malicious code is delivered to users who install the package.
AI Analysis
Technical Summary
The 'chai-as-promised-plus' package version 6.1.3 impersonates the widely-used 'chai-as-promised' package by reusing its README and description. The package's main file initially defines a legitimate plugin factory but then overwrites module.exports with a require call to an obfuscated configuration file. This configuration file is a multi-megabyte, single-line, heavily obfuscated JavaScript bundle that executes immediately upon requiring the package. Such a large obfuscated payload is unnecessary for a test-assertion helper and indicates a typosquatting supply-chain attack delivering malicious code to the consumer's environment.
Potential Impact
Consumers who install and require 'chai-as-promised-plus' version 6.1.3 will execute attacker-controlled code within their Node.js process. This can lead to arbitrary code execution, potentially compromising the security and integrity of the affected systems. No known exploits in the wild have been reported yet.
Mitigation Recommendations
No official patch or remediation is currently documented. Users should avoid installing or using the 'chai-as-promised-plus' package, especially version 6.1.3. Verify package names carefully to avoid typosquatting attacks and prefer the legitimate 'chai-as-promised' package. Monitor vendor advisories or trusted security sources for updates regarding remediation or removal.
Malicious code in chai-as-promised-plus (npm)
Description
The npm package 'chai-as-promised-plus' version 6.1.3 is a typosquatting malicious package that mimics the legitimate 'chai-as-promised' assertion helper. It contains a large obfuscated JavaScript payload that replaces the module exports at load time, executing attacker-controlled code within the consumer's Node.js process. This behavior is characteristic of supply-chain attacks where malicious code is delivered to users who install the package.
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-promised-plus' package version 6.1.3 impersonates the widely-used 'chai-as-promised' package by reusing its README and description. The package's main file initially defines a legitimate plugin factory but then overwrites module.exports with a require call to an obfuscated configuration file. This configuration file is a multi-megabyte, single-line, heavily obfuscated JavaScript bundle that executes immediately upon requiring the package. Such a large obfuscated payload is unnecessary for a test-assertion helper and indicates a typosquatting supply-chain attack delivering malicious code to the consumer's environment.
Potential Impact
Consumers who install and require 'chai-as-promised-plus' version 6.1.3 will execute attacker-controlled code within their Node.js process. This can lead to arbitrary code execution, potentially compromising the security and integrity of the affected systems. No known exploits in the wild have been reported yet.
Mitigation Recommendations
No official patch or remediation is currently documented. Users should avoid installing or using the 'chai-as-promised-plus' package, especially version 6.1.3. Verify package names carefully to avoid typosquatting attacks and prefer the legitimate 'chai-as-promised' package. Monitor vendor advisories or trusted security sources for updates regarding remediation or removal.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-13703
- Osv Schema Version
- 1.7.4
- Aliases
- []
- Ecosystems
- ["npm"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a79f0d1bf8831d539f60f30
Added to database: 08/10/2026, 15:40:01 UTC
Last enriched: 08/10/2026, 15:52:42 UTC
Last updated: 08/10/2026, 15:52:42 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.