Malicious code in chai-as-testkit (npm)
The npm package 'chai-as-testkit' version 2.3.5 is a malicious typosquatting package that impersonates the legitimate 'pino' logging library. It contains a large obfuscated payload that executes attacker-controlled code immediately upon import, enabling remote code execution within developer or CI Node.js environments. The package metadata misleads users by referencing vulnerability management and using unrelated author information. This is not a legitimate logging library but a vehicle for install-time code execution.
AI Analysis
Technical Summary
The 'chai-as-testkit' npm package version 2.3.5 is a malicious package designed to impersonate the 'pino' logging library. Instead of providing legitimate functionality, it ships a heavily obfuscated multi-megabyte JavaScript bundle that executes immediately when imported. The obfuscation includes rotated hex-escaped strings, control-flow flattening, and dead-code layers, making analysis difficult. The package metadata falsely attributes authorship and description to mislead users. This package acts as a typosquatting attack vector delivering install/import-time remote code execution (RCE) in Node.js environments.
Potential Impact
Any developer or continuous integration process that installs and imports 'chai-as-testkit' version 2.3.5 will execute attacker-controlled code within their Node.js environment. This can lead to compromise of development machines, build pipelines, or any systems running the affected code. The malicious payload runs immediately on import, increasing the risk of undetected exploitation.
Mitigation Recommendations
No official patch or remediation is indicated in the provided data. Users should avoid installing or importing the 'chai-as-testkit' package version 2.3.5. Verify package authenticity before installation, prefer official packages from trusted publishers, and audit dependencies for typosquatting or suspicious metadata. Monitor for and remove any instances of this package from development and CI environments.
Malicious code in chai-as-testkit (npm)
Description
The npm package 'chai-as-testkit' version 2.3.5 is a malicious typosquatting package that impersonates the legitimate 'pino' logging library. It contains a large obfuscated payload that executes attacker-controlled code immediately upon import, enabling remote code execution within developer or CI Node.js environments. The package metadata misleads users by referencing vulnerability management and using unrelated author information. This is not a legitimate logging library but a vehicle for install-time code execution.
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-testkit' npm package version 2.3.5 is a malicious package designed to impersonate the 'pino' logging library. Instead of providing legitimate functionality, it ships a heavily obfuscated multi-megabyte JavaScript bundle that executes immediately when imported. The obfuscation includes rotated hex-escaped strings, control-flow flattening, and dead-code layers, making analysis difficult. The package metadata falsely attributes authorship and description to mislead users. This package acts as a typosquatting attack vector delivering install/import-time remote code execution (RCE) in Node.js environments.
Potential Impact
Any developer or continuous integration process that installs and imports 'chai-as-testkit' version 2.3.5 will execute attacker-controlled code within their Node.js environment. This can lead to compromise of development machines, build pipelines, or any systems running the affected code. The malicious payload runs immediately on import, increasing the risk of undetected exploitation.
Mitigation Recommendations
No official patch or remediation is indicated in the provided data. Users should avoid installing or importing the 'chai-as-testkit' package version 2.3.5. Verify package authenticity before installation, prefer official packages from trusted publishers, and audit dependencies for typosquatting or suspicious metadata. Monitor for and remove any instances of this package from development and CI environments.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-14371
- Osv Schema Version
- 1.7.4
- Aliases
- []
- Ecosystems
- ["npm"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a8af9a3acd9273b49f32ef5
Added to database: 08/23/2026, 13:46:11 UTC
Last enriched: 08/23/2026, 13:50:07 UTC
Last updated: 08/24/2026, 01:11:45 UTC
Views: 8
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.