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…

MAL-2026-10043: Malicious code in chai-as-modified (npm)

0
High
Published: 07/09/2026 (07/09/2026, 15:34:58 UTC)
Source: GCVE Database
Product: chai-as-modified

Description

The npm package 'chai-as-modified' version 6.0.4 is identified as malicious. It masquerades as a variant of the legitimate 'chai-as-promised' plugin but contains code that attempts to spawn a detached Node.js subprocess running a hidden script, creating an out-of-band execution channel unrelated to its advertised functionality. The package includes decoy content copied from an unrelated project and a README copied from another source to mislead users. The referenced payload script is missing in this version, causing the subprocess to error out, which may indicate a staged attack or a payload delivered in subsequent updates.

Affected software

npmghsa
chai-as-modified
Affected versions
=6.0.4

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: 07/10/2026, 10:18:12 UTC

Technical Analysis

The 'chai-as-modified' npm package (version 6.0.4) is a malicious package designed to impersonate the widely-used 'chai-as-promised' plugin. Its main exported function, intended for use with 'chai.use(...)', launches a detached and unreferenced Node.js subprocess executing a sibling script './lib/initializeCaller.js'. This subprocess runs independently of the parent process, enabling covert execution outside the normal test runner lifecycle. The package includes decoy source code copied from the 'pino' project and a README copied from 'pinojs/pino' to disguise its true intent. The actual payload script is missing in this tarball, causing the subprocess to fail, consistent with a possible staged attack or payload delivery via subsequent package versions.

Potential Impact

If executed, the detached subprocess could enable unauthorized code execution outside the normal application context, potentially leading to system compromise or persistence. However, in this specific version (6.0.4), the payload script is missing, causing the subprocess to error out and limiting immediate impact. The presence of an out-of-band execution channel represents a significant security risk if the payload is delivered in future versions or via sibling packages.

Mitigation Recommendations

No official patch or fix is currently available. Users should avoid installing or using the 'chai-as-modified' package, especially version 6.0.4. Verify package authenticity and source before installation. Monitor for updates from trusted sources regarding remediation or removal of this malicious package from npm repositories. Since this is a malicious package impersonating a legitimate one, prefer using the official 'chai-as-promised' package or other trusted alternatives.

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-10043
Osv Schema Version
1.7.4
Aliases
[]
Ecosystems
["npm"]
Database Specific Severity
null
Cvss Version
null

Threat ID: 6a50bab068715ace4358591a

Added to database: 07/10/2026, 09:26:08 UTC

Last enriched: 07/10/2026, 10:18:12 UTC

Last updated: 07/10/2026, 10:18:12 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