Malicious code in chai-foundry (npm)
The npm package chai-foundry versions 7.0.2 and 7.0.3 is identified as a trojanized malicious package. It impersonates a legitimate chai plugin but contains heavily obfuscated code that executes immediately upon import. The large obfuscated payload hides network endpoints and malicious behaviors, consistent with a hostile dropper or stealer. No official patch or remediation guidance is provided.
AI Analysis
Technical Summary
The npm package [email protected] and 7.0.3 is a trojan package masquerading as a chai plugin. It copies badges, documentation, and version metadata from the unrelated pino logger to mislead users. Its main entry point loads a 3.5MB heavily obfuscated JavaScript file that uses string array rotation, runtime decoding, and control-flow flattening to conceal its true behavior. This obfuscated code runs immediately when the package is required, reconstructing network endpoints and payloads at runtime to evade static analysis. The package exhibits classic characteristics of a hostile npm dropper or stealer designed to compromise systems that install it.
Potential Impact
Users who install and require chai-foundry versions 7.0.2 or 7.0.3 risk executing malicious code that can perform unauthorized actions such as dropping additional payloads or stealing data. The obfuscation and runtime decoding make detection and analysis difficult, increasing the risk of unnoticed compromise. No known exploits in the wild are reported, but the package's behavior poses a significant security risk if used.
Mitigation Recommendations
No official patch or remediation is currently available. Users should immediately remove and avoid installing chai-foundry versions 7.0.2 and 7.0.3. Verify dependencies and use trusted package sources. Monitor for any updates from the package maintainers or npm advisories for remediation guidance.
Malicious code in chai-foundry (npm)
Description
The npm package chai-foundry versions 7.0.2 and 7.0.3 is identified as a trojanized malicious package. It impersonates a legitimate chai plugin but contains heavily obfuscated code that executes immediately upon import. The large obfuscated payload hides network endpoints and malicious behaviors, consistent with a hostile dropper or stealer. No official patch or remediation guidance is provided.
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 [email protected] and 7.0.3 is a trojan package masquerading as a chai plugin. It copies badges, documentation, and version metadata from the unrelated pino logger to mislead users. Its main entry point loads a 3.5MB heavily obfuscated JavaScript file that uses string array rotation, runtime decoding, and control-flow flattening to conceal its true behavior. This obfuscated code runs immediately when the package is required, reconstructing network endpoints and payloads at runtime to evade static analysis. The package exhibits classic characteristics of a hostile npm dropper or stealer designed to compromise systems that install it.
Potential Impact
Users who install and require chai-foundry versions 7.0.2 or 7.0.3 risk executing malicious code that can perform unauthorized actions such as dropping additional payloads or stealing data. The obfuscation and runtime decoding make detection and analysis difficult, increasing the risk of unnoticed compromise. No known exploits in the wild are reported, but the package's behavior poses a significant security risk if used.
Mitigation Recommendations
No official patch or remediation is currently available. Users should immediately remove and avoid installing chai-foundry versions 7.0.2 and 7.0.3. Verify dependencies and use trusted package sources. Monitor for any updates from the package maintainers or npm advisories for remediation guidance.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-13356
- Osv Schema Version
- 1.7.4
- Aliases
- []
- Ecosystems
- ["npm"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a73851abf8831d5394ef03d
Added to database: 08/05/2026, 18:46:50 UTC
Last enriched: 08/05/2026, 23:33:28 UTC
Last updated: 08/05/2026, 23:33:28 UTC
Views: 2
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.