Malicious code in chai-foundry (npm)
The npm package chai-foundry version 7.0.2 and 7.0.3 is identified as a trojanized malicious package masquerading as a chai plugin. It impersonates legitimate software by copying metadata from the pino logger and includes a heavily obfuscated multi-megabyte payload that executes immediately upon requiring the package. This payload hides its network endpoints and behavior, indicating it is a hostile dropper and stealer. Systems with this package installed should be considered fully compromised, and secrets and keys must be rotated from a separate, clean system.
AI Analysis
Technical Summary
The malicious npm package chai-foundry versions 7.0.2 and 7.0.3 impersonates a chai plugin but contains a large, heavily obfuscated payload loaded at import time. The package metadata is copied from the pino logger, and the main code uses complex obfuscation techniques including a large rotated string array, runtime decoders, and control-flow flattening to hide its behavior and network endpoints. This design is typical of hostile npm droppers and stealers that compromise systems upon installation.
Potential Impact
Any computer with chai-foundry versions 7.0.2 or 7.0.3 installed or running should be considered fully compromised. The malicious code likely grants full control to an attacker, risking theft of secrets, keys, and other sensitive data. Removal of the package alone does not guarantee elimination of all malicious artifacts or backdoors.
Mitigation Recommendations
Remove the malicious chai-foundry package immediately. Rotate all secrets, keys, and credentials from a separate, uncompromised system. Because the package likely grants full system compromise, consider a full system rebuild or forensic analysis to ensure no persistent backdoors remain. No official patch or fix is available; remediation relies on removal and credential rotation.
Malicious code in chai-foundry (npm)
Description
The npm package chai-foundry version 7.0.2 and 7.0.3 is identified as a trojanized malicious package masquerading as a chai plugin. It impersonates legitimate software by copying metadata from the pino logger and includes a heavily obfuscated multi-megabyte payload that executes immediately upon requiring the package. This payload hides its network endpoints and behavior, indicating it is a hostile dropper and stealer. Systems with this package installed should be considered fully compromised, and secrets and keys must be rotated from a separate, clean system.
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 malicious npm package chai-foundry versions 7.0.2 and 7.0.3 impersonates a chai plugin but contains a large, heavily obfuscated payload loaded at import time. The package metadata is copied from the pino logger, and the main code uses complex obfuscation techniques including a large rotated string array, runtime decoders, and control-flow flattening to hide its behavior and network endpoints. This design is typical of hostile npm droppers and stealers that compromise systems upon installation.
Potential Impact
Any computer with chai-foundry versions 7.0.2 or 7.0.3 installed or running should be considered fully compromised. The malicious code likely grants full control to an attacker, risking theft of secrets, keys, and other sensitive data. Removal of the package alone does not guarantee elimination of all malicious artifacts or backdoors.
Mitigation Recommendations
Remove the malicious chai-foundry package immediately. Rotate all secrets, keys, and credentials from a separate, uncompromised system. Because the package likely grants full system compromise, consider a full system rebuild or forensic analysis to ensure no persistent backdoors remain. No official patch or fix is available; remediation relies on removal and credential rotation.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-13356
- Osv Schema Version
- 1.7.4
- Ecosystems
- ["npm"]
Threat ID: 6a73851abf8831d5394ef03d
Added to database: 08/05/2026, 18:46:50 UTC
Last enriched: 09/12/2026, 07:01:50 UTC
Last updated: 09/17/2026, 06:27:22 UTC
Views: 18
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.