MAL-2026-10630: Malicious code in chai-as-byte (npm)
The npm package chai-as-byte versions 3.1.5 and 3.1.6 contains malicious code that, upon requiring the package, silently spawns a child process which exfiltrates the entire process environment variables to a remote server. The remote server then sends back code that is executed with full module access, enabling arbitrary code execution on the host. This exfiltration can leak sensitive information such as CI secrets, cloud tokens, and API keys. The package masquerades as part of the chai-as-* family but does not implement any legitimate functionality, instead performing this malicious activity without exposing any API.
AI Analysis
Technical Summary
The npm package chai-as-byte (versions 3.1.5 and 3.1.6) is a malicious package that, when required, detaches a child process running a script that sends the entire process.env to a base64-obfuscated URL. The response from this URL is executed as JavaScript code with full module require access, allowing the remote endpoint to execute arbitrary code on the host system. This results in exfiltration of environment variables, potentially including sensitive CI secrets, cloud tokens, and API keys. The package falsely advertises itself as a JSON logger and mimics the chai-as-* naming convention to evade detection. No legitimate library functionality is provided; the main entry point solely performs this exfiltration and remote code execution.
Potential Impact
This malicious package enables remote attackers to execute arbitrary code on the host system with full module access by exploiting the require process. It also leaks sensitive environment variables, including CI secrets, cloud tokens, and API keys, which can lead to further compromise of build environments and cloud resources.
Mitigation Recommendations
No official patch or remediation is currently documented. Users should immediately remove and avoid installing the affected versions (=3.1.5, =3.1.6) of chai-as-byte. Audit dependencies to detect and eliminate this package from build environments. Monitor for any unauthorized access or suspicious activity related to leaked credentials. Patch status is not yet confirmed — check the vendor advisory or trusted sources for updates on remediation.
MAL-2026-10630: Malicious code in chai-as-byte (npm)
Description
The npm package chai-as-byte versions 3.1.5 and 3.1.6 contains malicious code that, upon requiring the package, silently spawns a child process which exfiltrates the entire process environment variables to a remote server. The remote server then sends back code that is executed with full module access, enabling arbitrary code execution on the host. This exfiltration can leak sensitive information such as CI secrets, cloud tokens, and API keys. The package masquerades as part of the chai-as-* family but does not implement any legitimate functionality, instead performing this malicious activity without exposing any API.
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 npm package chai-as-byte (versions 3.1.5 and 3.1.6) is a malicious package that, when required, detaches a child process running a script that sends the entire process.env to a base64-obfuscated URL. The response from this URL is executed as JavaScript code with full module require access, allowing the remote endpoint to execute arbitrary code on the host system. This results in exfiltration of environment variables, potentially including sensitive CI secrets, cloud tokens, and API keys. The package falsely advertises itself as a JSON logger and mimics the chai-as-* naming convention to evade detection. No legitimate library functionality is provided; the main entry point solely performs this exfiltration and remote code execution.
Potential Impact
This malicious package enables remote attackers to execute arbitrary code on the host system with full module access by exploiting the require process. It also leaks sensitive environment variables, including CI secrets, cloud tokens, and API keys, which can lead to further compromise of build environments and cloud resources.
Mitigation Recommendations
No official patch or remediation is currently documented. Users should immediately remove and avoid installing the affected versions (=3.1.5, =3.1.6) of chai-as-byte. Audit dependencies to detect and eliminate this package from build environments. Monitor for any unauthorized access or suspicious activity related to leaked credentials. Patch status is not yet confirmed — check the vendor advisory or trusted sources for updates on remediation.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-10630
- Osv Schema Version
- 1.7.4
- Aliases
- []
- Ecosystems
- ["npm"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a577ef668715ace43b41c6a
Added to database: 07/15/2026, 12:37:10 UTC
Last enriched: 07/15/2026, 12:58:38 UTC
Last updated: 07/16/2026, 03:36:34 UTC
Views: 5
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.