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-promised-plus (npm)

0
High
Published: 08/10/2026 (08/10/2026, 12:31:42 UTC)
Source: GCVE Database
Product: chai-as-promised-plus

Description

The npm package 'chai-as-promised-plus' version 6.1.3 is a typosquatting malicious package that mimics the legitimate 'chai-as-promised' assertion helper. It contains a large obfuscated JavaScript payload that replaces the module exports at load time, executing attacker-controlled code within the consumer's Node.js process. This behavior is characteristic of supply-chain attacks where malicious code is delivered to users who install the package.

Affected software

npmghsa
chai-as-promised-plus
Affected versions
=6.1.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:42 UTC

Technical Analysis

The 'chai-as-promised-plus' package version 6.1.3 impersonates the widely-used 'chai-as-promised' package by reusing its README and description. The package's main file initially defines a legitimate plugin factory but then overwrites module.exports with a require call to an obfuscated configuration file. This configuration file is a multi-megabyte, single-line, heavily obfuscated JavaScript bundle that executes immediately upon requiring the package. Such a large obfuscated payload is unnecessary for a test-assertion helper and indicates a typosquatting supply-chain attack delivering malicious code to the consumer's environment.

Potential Impact

Consumers who install and require 'chai-as-promised-plus' version 6.1.3 will execute attacker-controlled code within their Node.js process. This can lead to arbitrary code execution, potentially compromising the security and integrity of the affected systems. No known exploits in the wild have been reported yet.

Mitigation Recommendations

No official patch or remediation is currently documented. Users should avoid installing or using the 'chai-as-promised-plus' package, especially version 6.1.3. Verify package names carefully to avoid typosquatting attacks and prefer the legitimate 'chai-as-promised' package. Monitor vendor advisories or trusted security sources for updates regarding remediation or removal.

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

Threat ID: 6a79f0d1bf8831d539f60f30

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

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

Last updated: 08/10/2026, 15:52:42 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