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-sets (npm)

0
Critical
Published: 07/14/2026 (07/14/2026, 02:29:52 UTC)
Source: GCVE Database
Product: chai-as-sets

Description

The npm package chai-as-sets version 3.1.3 contains malicious code that executes upon module load. It spawns a detached child process which decodes a hardcoded URL and sends the installer's environment variables to a remote server. The server's response is executed as code with access to the package's require function, enabling arbitrary remote code execution. The package attempts to disguise itself by impersonating another library (pino).

Affected software

npmghsa
chai-as-sets
Affected versions
=3.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: 07/14/2026, 09:40:09 UTC

Technical Analysis

The chai-as-sets package version 3.1.3 is a malicious npm package that, when required, spawns a detached child process executing lib/initializeCaller.js. This process base64-decodes a hardcoded URL pointing to a command-and-control server and POSTs the entire process environment variables to it. The server's HTTP response body is then passed to a new Function constructor with require injected, allowing the remote server to execute arbitrary code on the host. The package masquerades as a pino-related module to evade detection. This behavior constitutes a supply chain attack via a malicious package.

Potential Impact

Any system that installs and requires chai-as-sets version 3.1.3 is at risk of arbitrary remote code execution controlled by the attacker. The attacker can exfiltrate environment variables and execute arbitrary code with the privileges of the process loading the package. This can lead to full system compromise depending on the environment and privileges.

Mitigation Recommendations

No official patch or remediation is currently documented. Users should immediately remove and avoid using chai-as-sets version 3.1.3. Audit dependencies for this package and replace it with a trusted alternative. Monitor for any unexpected network connections to the indicated C2 URL. Patch status is not yet confirmed — check the vendor advisory or trusted sources for updates.

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

Threat ID: 6a55ff7d68715ace432f3881

Added to database: 07/14/2026, 09:21:01 UTC

Last enriched: 07/14/2026, 09:40:09 UTC

Last updated: 07/28/2026, 06:54:57 UTC

Views: 35

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