Malicious code in chai-as-format (npm)
The npm package 'chai-as-format' version 2.3.5 contains malicious code disguised as a configuration module. Its main file loads a heavily obfuscated, multi-megabyte decoder that executes on every import, acting as a trojan loader. The package falsely claims to be related to vulnerability management but includes copied content from an unrelated logging framework, indicating impersonation and deception.
AI Analysis
Technical Summary
The 'chai-as-format' npm package at version 2.3.5 includes an index.js that unconditionally requires a large (~4MB) obfuscated file containing a hex-encoded string array and complex decoding logic. This obfuscated code executes on every require call, effectively acting as a trojan loader. The package's README, LICENSE, and documentation are copied from the unrelated 'pino' logging framework, while the package.json description misleadingly references vulnerability management. This mismatch and the presence of a large opaque decoder module indicate that the package is malicious, designed to load hidden malicious code under the guise of a legitimate package.
Potential Impact
Any system that installs or imports 'chai-as-format' version 2.3.5 will execute the embedded obfuscated code, potentially leading to unauthorized code execution or compromise. The obfuscation and deception suggest the package is intended to evade detection and perform malicious actions on the installer's machine.
Mitigation Recommendations
No official patch or remediation is currently documented. Users should avoid installing or using 'chai-as-format' version 2.3.5. Remove the package from any affected environments and replace it with trusted alternatives. Monitor for any unexpected behavior related to this package. Patch status is not yet confirmed — check the vendor advisory or trusted security sources for updates.
Malicious code in chai-as-format (npm)
Description
The npm package 'chai-as-format' version 2.3.5 contains malicious code disguised as a configuration module. Its main file loads a heavily obfuscated, multi-megabyte decoder that executes on every import, acting as a trojan loader. The package falsely claims to be related to vulnerability management but includes copied content from an unrelated logging framework, indicating impersonation and deception.
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-format' npm package at version 2.3.5 includes an index.js that unconditionally requires a large (~4MB) obfuscated file containing a hex-encoded string array and complex decoding logic. This obfuscated code executes on every require call, effectively acting as a trojan loader. The package's README, LICENSE, and documentation are copied from the unrelated 'pino' logging framework, while the package.json description misleadingly references vulnerability management. This mismatch and the presence of a large opaque decoder module indicate that the package is malicious, designed to load hidden malicious code under the guise of a legitimate package.
Potential Impact
Any system that installs or imports 'chai-as-format' version 2.3.5 will execute the embedded obfuscated code, potentially leading to unauthorized code execution or compromise. The obfuscation and deception suggest the package is intended to evade detection and perform malicious actions on the installer's machine.
Mitigation Recommendations
No official patch or remediation is currently documented. Users should avoid installing or using 'chai-as-format' version 2.3.5. Remove the package from any affected environments and replace it with trusted alternatives. Monitor for any unexpected behavior related to this package. Patch status is not yet confirmed — check the vendor advisory or trusted security sources for updates.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-13701
- Osv Schema Version
- 1.7.4
- Aliases
- []
- Ecosystems
- ["npm"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a79f0cabf8831d539f606df
Added to database: 08/10/2026, 15:39:54 UTC
Last enriched: 08/10/2026, 15:48:18 UTC
Last updated: 08/10/2026, 15:48:18 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.