Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

Malicious code in chai-as-bench (npm)

0
High
Published: 08/10/2026 (08/10/2026, 12:29:53 UTC)
Source: GCVE Database
Product: chai-as-bench

Description

The npm package 'chai-as-bench' version 7.0.3 is a malicious supply-chain threat masquerading as a chai plugin. It contains a heavily obfuscated multi-megabyte payload that executes on every require(), unrelated to its advertised functionality. The package includes stolen files from an unrelated project as camouflage and exports a no-op middleware. This behavior is typical of npm packages designed to target developers who mistype legitimate package names.

Affected software

npmghsa
chai-as-bench
Affected versions
=7.0.3

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

AILast updated: 08/10/2026, 15:52:58 UTC

Technical Analysis

The 'chai-as-bench' npm package (version 7.0.3) falsely presents itself as a chai plugin but contains no chai-related functionality. Instead, it loads a heavily obfuscated ~4 MB payload on require(), featuring a large rotating string array, hex-obfuscated identifiers, and control-flow flattening. Other files in the package are copied verbatim from the unrelated 'pino' logger project to disguise its malicious intent. The package exports only a no-op Express-style middleware function. This pattern is consistent with supply-chain attacks targeting developers who accidentally install similarly named malicious packages.

Potential Impact

The malicious payload runs automatically when the package is required, potentially enabling unauthorized code execution or data exfiltration in developer environments. The obfuscation and camouflage increase the difficulty of detection. While no active exploits in the wild are reported, the package poses a significant risk to development supply chains if mistakenly installed.

Mitigation Recommendations

No official patch or fix is available for this malicious package. The recommended mitigation is to avoid installing 'chai-as-bench' version 7.0.3 and verify package names carefully before installation. Use trusted package sources and consider implementing supply-chain security measures such as package integrity verification and dependency auditing.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
MAL-2026-13699
Osv Schema Version
1.7.4
Aliases
[]
Ecosystems
["npm"]
Database Specific Severity
null
Cvss Version
null

Threat ID: 6a79f0d2bf8831d539f60f3c

Added to database: 08/10/2026, 15:40:02 UTC

Last enriched: 08/10/2026, 15:52:58 UTC

Last updated: 08/10/2026, 15:52:58 UTC

Views: 2

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses