Malicious code in chai-jsonss (npm)
The npm package chai-jsonss version 3.7.7 contains malicious code that executes attacker-controlled JavaScript during import. It fetches a base64-encoded payload from a remote URL, decodes it, and executes it in-process using new Function, enabling remote code execution. The package masquerades as related to chai but has no chai functionality. This behavior occurs immediately on import without user interaction.
AI Analysis
Technical Summary
The chai-jsonss npm package version 3.7.7 includes malicious code that, upon import, calls a function postCallers() which decodes a base64 URL from its internal constants. It then performs an HTTP GET request to this URL using axios, retrieves a base64-encoded JavaScript payload from the response, decodes it, and executes it dynamically via new Function(require). This results in execution of attacker-controlled code within the importing process. The remote payload URL is obfuscated as a shortlink and stored in a fake process.env-like local module field named DEV_API_KEY. The package name is deceptive, resembling the legitimate chai package but containing no chai-related code, only this malicious fetch-and-execute behavior.
Potential Impact
This malicious package enables remote code execution in any environment that imports chai-jsonss version 3.7.7, potentially allowing attackers to execute arbitrary code with the privileges of the importing process. This can lead to full system compromise, data theft, or further malware deployment. The attack is triggered automatically on import, requiring no additional user action.
Mitigation Recommendations
No official patch or remediation is currently documented. Users should immediately remove and avoid using chai-jsonss version 3.7.7. Audit dependencies for this package and replace it with trusted alternatives. Monitor for any unexpected network activity or code execution related to this package. Patch status is not yet confirmed — check the vendor advisory or npm security advisories for updates.
Malicious code in chai-jsonss (npm)
Description
The npm package chai-jsonss version 3.7.7 contains malicious code that executes attacker-controlled JavaScript during import. It fetches a base64-encoded payload from a remote URL, decodes it, and executes it in-process using new Function, enabling remote code execution. The package masquerades as related to chai but has no chai functionality. This behavior occurs immediately on import without user interaction.
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-jsonss npm package version 3.7.7 includes malicious code that, upon import, calls a function postCallers() which decodes a base64 URL from its internal constants. It then performs an HTTP GET request to this URL using axios, retrieves a base64-encoded JavaScript payload from the response, decodes it, and executes it dynamically via new Function(require). This results in execution of attacker-controlled code within the importing process. The remote payload URL is obfuscated as a shortlink and stored in a fake process.env-like local module field named DEV_API_KEY. The package name is deceptive, resembling the legitimate chai package but containing no chai-related code, only this malicious fetch-and-execute behavior.
Potential Impact
This malicious package enables remote code execution in any environment that imports chai-jsonss version 3.7.7, potentially allowing attackers to execute arbitrary code with the privileges of the importing process. This can lead to full system compromise, data theft, or further malware deployment. The attack is triggered automatically on import, requiring no additional user action.
Mitigation Recommendations
No official patch or remediation is currently documented. Users should immediately remove and avoid using chai-jsonss version 3.7.7. Audit dependencies for this package and replace it with trusted alternatives. Monitor for any unexpected network activity or code execution related to this package. Patch status is not yet confirmed — check the vendor advisory or npm security advisories for updates.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-13692
- Osv Schema Version
- 1.7.4
- Aliases
- []
- Ecosystems
- ["npm"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a79f0dbbf8831d539f618a6
Added to database: 08/10/2026, 15:40:11 UTC
Last enriched: 08/10/2026, 15:57:38 UTC
Last updated: 08/10/2026, 18:44:20 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.