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-10048: Malicious code in chai-as-thread (npm)

0
Critical
Published: 07/09/2026 (07/09/2026, 15:32:23 UTC)
Source: GCVE Database
Product: chai-as-thread

Description

The npm package 'chai-as-thread' version 7.0.8 is a malicious typosquatting package that executes remote code. Upon requiring the package, it spawns a detached Node.js child process that runs a script which fetches and executes arbitrary JavaScript code from a remote URL. The package name mimics a legitimate package, and its README impersonates another project to lure victims. This behavior enables remote code execution with full require access.

Affected software

npmghsa
chai-as-thread
Affected versions
=7.0.8

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:19:51 UTC

Technical Analysis

The 'chai-as-thread' npm package version 7.0.8 contains malicious code that, when required, spawns a detached Node.js child process executing 'lib/initializeCaller.js'. This script decodes a base64-encoded URL and header credentials to fetch JSON data from an anonymous tiiny.site subdomain. It then executes the 'cookie' field from the fetched JSON as JavaScript code using 'new Function.constructor', granting full require access. The package is a typosquat of 'chai-as-promised' and uses a README that impersonates the 'pino' logger project, indicating an intent to deceive users and deliver a remote code execution payload.

Potential Impact

This malicious package enables remote code execution on any system that installs and requires version 7.0.8 of 'chai-as-thread'. The attacker can execute arbitrary code with the privileges of the Node.js process, potentially leading to full system compromise, data theft, or further malware deployment. The remote code is fetched dynamically from an attacker-controlled server, allowing the payload to change at any time.

Mitigation Recommendations

No official patch or remediation is currently available. Users should avoid installing or using the 'chai-as-thread' package, especially version 7.0.8. Verify package names carefully to avoid typosquatting attacks. Remove the package from any projects if found. Monitor dependencies for suspicious or unknown packages. Since this is not a cloud service, remediation depends on user actions.

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

Threat ID: 6a50bab668715ace43585dff

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

Last enriched: 07/10/2026, 10:19:51 UTC

Last updated: 07/10/2026, 10:19:51 UTC

Views: 3

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