MAL-2026-10041: Malicious code in chai-as-buffered (npm)
The npm package chai-as-buffered version 3.7.24 is a malicious typosquatting package impersonating chai-as-promised and the pino logger. It contains code that, when loaded, fetches attacker-controlled JavaScript from a remote JSON storage service and executes it with full require access on the host machine. This allows arbitrary code execution in any environment that installs or uses this package version.
AI Analysis
Technical Summary
[email protected] is a typosquatting malicious package that disguises itself as chai-as-promised and mimics the pino logger in its exports and README. Its lib/caller.js shadows the process object to hide base64-encoded constants for a command-and-control URL and related headers. When the package middleware is invoked, it decodes the hidden URL, spawns a detached child process that fetches a JSON document from an attacker-controlled mutable JSON storage endpoint, extracts a 'cookie' field containing JavaScript code, and executes it via Function.constructor with live require access. This design enables the attacker to run arbitrary code on any system that installs or requires this package version.
Potential Impact
This malicious package enables arbitrary remote code execution on any system that installs or uses [email protected]. The attacker can change the payload at any time via the mutable JSON storage, allowing dynamic and persistent compromise of affected environments.
Mitigation Recommendations
No official patch or fix is available for this malicious package. The recommended mitigation is to avoid installing or using [email protected]. Remove any existing installations of this package from your environment and replace it with the legitimate chai-as-promised package or other trusted alternatives. Conduct supply chain audits to detect and prevent use of typosquatting or malicious packages.
MAL-2026-10041: Malicious code in chai-as-buffered (npm)
Description
The npm package chai-as-buffered version 3.7.24 is a malicious typosquatting package impersonating chai-as-promised and the pino logger. It contains code that, when loaded, fetches attacker-controlled JavaScript from a remote JSON storage service and executes it with full require access on the host machine. This allows arbitrary code execution in any environment that installs or uses this package version.
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
[email protected] is a typosquatting malicious package that disguises itself as chai-as-promised and mimics the pino logger in its exports and README. Its lib/caller.js shadows the process object to hide base64-encoded constants for a command-and-control URL and related headers. When the package middleware is invoked, it decodes the hidden URL, spawns a detached child process that fetches a JSON document from an attacker-controlled mutable JSON storage endpoint, extracts a 'cookie' field containing JavaScript code, and executes it via Function.constructor with live require access. This design enables the attacker to run arbitrary code on any system that installs or requires this package version.
Potential Impact
This malicious package enables arbitrary remote code execution on any system that installs or uses [email protected]. The attacker can change the payload at any time via the mutable JSON storage, allowing dynamic and persistent compromise of affected environments.
Mitigation Recommendations
No official patch or fix is available for this malicious package. The recommended mitigation is to avoid installing or using [email protected]. Remove any existing installations of this package from your environment and replace it with the legitimate chai-as-promised package or other trusted alternatives. Conduct supply chain audits to detect and prevent use of typosquatting or malicious packages.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-10041
- Osv Schema Version
- 1.7.4
- Aliases
- []
- Ecosystems
- ["npm"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a50bab068715ace4358591d
Added to database: 07/10/2026, 09:26:08 UTC
Last enriched: 07/10/2026, 10:18:18 UTC
Last updated: 07/10/2026, 10:18:18 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.