MAL-2026-10039: Malicious code in chai-as-align (npm)
The npm package 'chai-as-align' version 7.1.0 is a typosquatting malicious package that executes remote code on the installer's machine. It masquerades as a testing/logging helper but spawns a detached Node.js child process that fetches and executes attacker-controlled code from a hidden URL. This behavior enables full remote code execution when the package's exported middleware is invoked.
AI Analysis
Technical Summary
The 'chai-as-align' package (version 7.1.0) is a malicious npm package designed to look like the legitimate 'chai-as-promised' library. Its exported middleware factory spawns a detached, unreferenced Node.js child process that runs a script which base64-decodes a hidden URL. This URL points to an attacker-controlled JSON file hosted on an anonymous file-hosting service (tiiny.site). The script fetches a 'cookie' field from this URL using a secret header and executes the fetched code via a dynamically constructed Function constructor bound to the real 'require'. This process runs in a retry loop, effectively yielding full remote code execution on any machine that installs and invokes the middleware. The detached child process with ignored stdio is used to conceal the malicious activity from the host application.
Potential Impact
This vulnerability allows an attacker to execute arbitrary code remotely on the installer's machine by delivering malicious payloads through an attacker-controlled URL. The malicious code runs with the privileges of the user executing the package, potentially leading to full system compromise, data theft, or further malware deployment. The typosquatting nature increases the risk of accidental installation by developers expecting the legitimate 'chai-as-promised' package.
Mitigation Recommendations
No official patch or fix is currently available for this malicious package. Users should immediately remove 'chai-as-align' version 7.1.0 from their dependencies and avoid installing packages with suspicious or typosquatting names. Use verified sources and package names when installing npm packages. Monitor dependency manifests for unauthorized or unexpected packages. Since this is a malicious package rather than a vulnerability in legitimate software, remediation involves removing the package and auditing systems for compromise.
MAL-2026-10039: Malicious code in chai-as-align (npm)
Description
The npm package 'chai-as-align' version 7.1.0 is a typosquatting malicious package that executes remote code on the installer's machine. It masquerades as a testing/logging helper but spawns a detached Node.js child process that fetches and executes attacker-controlled code from a hidden URL. This behavior enables full remote code execution when the package's exported middleware is invoked.
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-align' package (version 7.1.0) is a malicious npm package designed to look like the legitimate 'chai-as-promised' library. Its exported middleware factory spawns a detached, unreferenced Node.js child process that runs a script which base64-decodes a hidden URL. This URL points to an attacker-controlled JSON file hosted on an anonymous file-hosting service (tiiny.site). The script fetches a 'cookie' field from this URL using a secret header and executes the fetched code via a dynamically constructed Function constructor bound to the real 'require'. This process runs in a retry loop, effectively yielding full remote code execution on any machine that installs and invokes the middleware. The detached child process with ignored stdio is used to conceal the malicious activity from the host application.
Potential Impact
This vulnerability allows an attacker to execute arbitrary code remotely on the installer's machine by delivering malicious payloads through an attacker-controlled URL. The malicious code runs with the privileges of the user executing the package, potentially leading to full system compromise, data theft, or further malware deployment. The typosquatting nature increases the risk of accidental installation by developers expecting the legitimate 'chai-as-promised' package.
Mitigation Recommendations
No official patch or fix is currently available for this malicious package. Users should immediately remove 'chai-as-align' version 7.1.0 from their dependencies and avoid installing packages with suspicious or typosquatting names. Use verified sources and package names when installing npm packages. Monitor dependency manifests for unauthorized or unexpected packages. Since this is a malicious package rather than a vulnerability in legitimate software, remediation involves removing the package and auditing systems for compromise.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-10039
- Osv Schema Version
- 1.7.4
- Aliases
- []
- Ecosystems
- ["npm"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a50bab068715ace43585929
Added to database: 07/10/2026, 09:26:08 UTC
Last enriched: 07/10/2026, 10:18:52 UTC
Last updated: 07/10/2026, 10:18:52 UTC
Views: 4
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.