Malicious code in chai-as-verified (npm)
The npm package 'chai-as-verified' version 7.1.5 is identified as malicious. It masquerades as a legitimate package similar to 'chai-as-promised' but contains code that spawns a detached Node.js child process. This process fetches and executes remote JavaScript code from a hidden command-and-control (C2) server, granting the attacker full access to Node.js require functionality. The C2 URL and related headers are base64-encoded to evade static detection.
AI Analysis
Technical Summary
The 'chai-as-verified' package version 7.1.5 is a typosquatting malicious package that, upon being required, executes a middleware function spawning a detached Node.js child process. This child process retrieves a JavaScript payload from a base64-encoded URL stored in environment variables, using a base64-decoded secret header for authentication. The payload is executed dynamically with full Node.js require access, enabling arbitrary code execution. The use of base64 encoding for the C2 URL and headers is intended to evade static analysis detection.
Potential Impact
This malicious package enables remote code execution within the Node.js environment where it is installed. The attacker can run arbitrary code with the privileges of the Node.js process, potentially leading to full system compromise, data exfiltration, or further malicious activity. Because the payload is fetched and executed dynamically, the attacker can change the behavior at will after installation.
Mitigation Recommendations
No official patch or remediation is currently available. Users should immediately remove the 'chai-as-verified' package version 7.1.5 from their projects and replace it with the legitimate 'chai-as-promised' package or other trusted alternatives. Review dependencies for typosquatting or suspicious packages before installation. Monitor for any unexpected child processes or network connections originating from Node.js processes.
Malicious code in chai-as-verified (npm)
Description
The npm package 'chai-as-verified' version 7.1.5 is identified as malicious. It masquerades as a legitimate package similar to 'chai-as-promised' but contains code that spawns a detached Node.js child process. This process fetches and executes remote JavaScript code from a hidden command-and-control (C2) server, granting the attacker full access to Node.js require functionality. The C2 URL and related headers are base64-encoded to evade static detection.
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-verified' package version 7.1.5 is a typosquatting malicious package that, upon being required, executes a middleware function spawning a detached Node.js child process. This child process retrieves a JavaScript payload from a base64-encoded URL stored in environment variables, using a base64-decoded secret header for authentication. The payload is executed dynamically with full Node.js require access, enabling arbitrary code execution. The use of base64 encoding for the C2 URL and headers is intended to evade static analysis detection.
Potential Impact
This malicious package enables remote code execution within the Node.js environment where it is installed. The attacker can run arbitrary code with the privileges of the Node.js process, potentially leading to full system compromise, data exfiltration, or further malicious activity. Because the payload is fetched and executed dynamically, the attacker can change the behavior at will after installation.
Mitigation Recommendations
No official patch or remediation is currently available. Users should immediately remove the 'chai-as-verified' package version 7.1.5 from their projects and replace it with the legitimate 'chai-as-promised' package or other trusted alternatives. Review dependencies for typosquatting or suspicious packages before installation. Monitor for any unexpected child processes or network connections originating from Node.js processes.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-10504
- Osv Schema Version
- 1.7.4
- Aliases
- []
- Ecosystems
- ["npm"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a55ff8e68715ace432f4a75
Added to database: 07/14/2026, 09:21:18 UTC
Last enriched: 07/14/2026, 09:47:48 UTC
Last updated: 07/31/2026, 19:28:27 UTC
Views: 59
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.