Malicious code in chai-as-map (npm)
The npm package 'chai-as-map' version 2.3.5 is identified as malicious. It masquerades as a chai-related utility but contains a large obfuscated payload executed at import time. The package bundles source code from the pino logger but exports only a no-op Express middleware. The obfuscated code includes a multi-megabyte hex string array with complex decoding, suggesting a stealer or loader functionality delivered via typosquatting and name confusion. The package also declares an unnecessary axios dependency, likely to reconstruct a remote destination at runtime. No CVSS score is available for this threat.
AI Analysis
Technical Summary
The 'chai-as-map' npm package (version 2.3.5) is a malicious package designed to appear as a legitimate chai utility. It includes verbatim pino logger source files but exports a no-op Express middleware API. The critical malicious component is a large (~4MB) obfuscated hex string array in lib/config.js, employing rotated decoders and control-flow flattening, which executes automatically upon module import. The package.json declares axios as a runtime dependency despite no network I/O in the public API, indicating the obfuscated code likely reconstructs and contacts a remote endpoint at runtime. This combination of typosquatting, misleading contents, and an opaque auto-executed payload is consistent with a stealer or loader malware delivered through npm.
Potential Impact
Loading the package executes a large obfuscated payload that likely performs unauthorized actions such as data theft or loading additional malicious code. The presence of axios as a dependency suggests network communication to a remote server, potentially enabling data exfiltration or further compromise. Users installing or importing this package risk executing malicious code under the guise of a legitimate utility.
Mitigation Recommendations
No official patch or remediation is available. Users should avoid installing or using the 'chai-as-map' package version 2.3.5. Remove any installations of this package from projects and replace with trusted alternatives. Monitor dependency sources carefully to avoid typosquatting attacks. Since this is a malicious package, remediation involves removal and avoiding its use rather than patching.
Malicious code in chai-as-map (npm)
Description
The npm package 'chai-as-map' version 2.3.5 is identified as malicious. It masquerades as a chai-related utility but contains a large obfuscated payload executed at import time. The package bundles source code from the pino logger but exports only a no-op Express middleware. The obfuscated code includes a multi-megabyte hex string array with complex decoding, suggesting a stealer or loader functionality delivered via typosquatting and name confusion. The package also declares an unnecessary axios dependency, likely to reconstruct a remote destination at runtime. No CVSS score is available for this threat.
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-map' npm package (version 2.3.5) is a malicious package designed to appear as a legitimate chai utility. It includes verbatim pino logger source files but exports a no-op Express middleware API. The critical malicious component is a large (~4MB) obfuscated hex string array in lib/config.js, employing rotated decoders and control-flow flattening, which executes automatically upon module import. The package.json declares axios as a runtime dependency despite no network I/O in the public API, indicating the obfuscated code likely reconstructs and contacts a remote endpoint at runtime. This combination of typosquatting, misleading contents, and an opaque auto-executed payload is consistent with a stealer or loader malware delivered through npm.
Potential Impact
Loading the package executes a large obfuscated payload that likely performs unauthorized actions such as data theft or loading additional malicious code. The presence of axios as a dependency suggests network communication to a remote server, potentially enabling data exfiltration or further compromise. Users installing or importing this package risk executing malicious code under the guise of a legitimate utility.
Mitigation Recommendations
No official patch or remediation is available. Users should avoid installing or using the 'chai-as-map' package version 2.3.5. Remove any installations of this package from projects and replace with trusted alternatives. Monitor dependency sources carefully to avoid typosquatting attacks. Since this is a malicious package, remediation involves removal and avoiding its use rather than patching.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-13702
- Osv Schema Version
- 1.7.4
- Aliases
- []
- Ecosystems
- ["npm"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a79f0d3bf8831d539f61002
Added to database: 08/10/2026, 15:40:03 UTC
Last enriched: 08/10/2026, 15:53:09 UTC
Last updated: 08/10/2026, 15:53:09 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.