MAL-2026-10048: Malicious code in chai-as-thread (npm)
The npm package 'chai-as-thread' version 7.0.8 is a malicious typosquatting package that executes remote code. Upon requiring the package, it spawns a detached Node.js child process that runs a script which fetches and executes arbitrary JavaScript code from a remote URL. The package name mimics a legitimate package, and its README impersonates another project to lure victims. This behavior enables remote code execution with full require access.
AI Analysis
Technical Summary
The 'chai-as-thread' npm package version 7.0.8 contains malicious code that, when required, spawns a detached Node.js child process executing 'lib/initializeCaller.js'. This script decodes a base64-encoded URL and header credentials to fetch JSON data from an anonymous tiiny.site subdomain. It then executes the 'cookie' field from the fetched JSON as JavaScript code using 'new Function.constructor', granting full require access. The package is a typosquat of 'chai-as-promised' and uses a README that impersonates the 'pino' logger project, indicating an intent to deceive users and deliver a remote code execution payload.
Potential Impact
This malicious package enables remote code execution on any system that installs and requires version 7.0.8 of 'chai-as-thread'. The attacker can execute arbitrary code with the privileges of the Node.js process, potentially leading to full system compromise, data theft, or further malware deployment. The remote code is fetched dynamically from an attacker-controlled server, allowing the payload to change at any time.
Mitigation Recommendations
No official patch or remediation is currently available. Users should avoid installing or using the 'chai-as-thread' package, especially version 7.0.8. Verify package names carefully to avoid typosquatting attacks. Remove the package from any projects if found. Monitor dependencies for suspicious or unknown packages. Since this is not a cloud service, remediation depends on user actions.
MAL-2026-10048: Malicious code in chai-as-thread (npm)
Description
The npm package 'chai-as-thread' version 7.0.8 is a malicious typosquatting package that executes remote code. Upon requiring the package, it spawns a detached Node.js child process that runs a script which fetches and executes arbitrary JavaScript code from a remote URL. The package name mimics a legitimate package, and its README impersonates another project to lure victims. This behavior enables remote code execution with full require access.
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-thread' npm package version 7.0.8 contains malicious code that, when required, spawns a detached Node.js child process executing 'lib/initializeCaller.js'. This script decodes a base64-encoded URL and header credentials to fetch JSON data from an anonymous tiiny.site subdomain. It then executes the 'cookie' field from the fetched JSON as JavaScript code using 'new Function.constructor', granting full require access. The package is a typosquat of 'chai-as-promised' and uses a README that impersonates the 'pino' logger project, indicating an intent to deceive users and deliver a remote code execution payload.
Potential Impact
This malicious package enables remote code execution on any system that installs and requires version 7.0.8 of 'chai-as-thread'. The attacker can execute arbitrary code with the privileges of the Node.js process, potentially leading to full system compromise, data theft, or further malware deployment. The remote code is fetched dynamically from an attacker-controlled server, allowing the payload to change at any time.
Mitigation Recommendations
No official patch or remediation is currently available. Users should avoid installing or using the 'chai-as-thread' package, especially version 7.0.8. Verify package names carefully to avoid typosquatting attacks. Remove the package from any projects if found. Monitor dependencies for suspicious or unknown packages. Since this is not a cloud service, remediation depends on user actions.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-10048
- Osv Schema Version
- 1.7.4
- Aliases
- []
- Ecosystems
- ["npm"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a50bab668715ace43585dff
Added to database: 07/10/2026, 09:26:14 UTC
Last enriched: 07/10/2026, 10:19:51 UTC
Last updated: 07/10/2026, 10:19:51 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.
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.