Skip to main content

Malicious code in chai-guid (npm)

0
Critical
Published: 06/16/2026 (06/16/2026, 16:22:49 UTC)
Source: GCVE Database
Product: chai-guid

Description

The npm package chai-guid version 1.1.5 contains malicious code that impersonates legitimate packages and executes attacker-controlled JavaScript code with full Node.js privileges when its middleware is invoked. It fetches and runs code from an anonymous JSON paste service, enabling remote code execution on the consumer's machine.

Affected software

npmghsa
chai-guid
Affected versions
=1.1.5

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: 09/08/2026, 09:23:03 UTC

Technical Analysis

The chai-guid npm package (version 1.1.5) impersonates the pino logger and chai-guid chai plugin by copying README badges and exporting middleware as 'pino'. When this middleware is called, it spawns a detached Node.js process that fetches JavaScript code from an anonymous JSON paste host (jsonkeeper.com) and executes it using the Function constructor with full Node.js privileges and access to 'require'. A secondary command-and-control URL is embedded as a base64-encoded string in the code. This design allows an attacker to remotely execute arbitrary code on any system that installs and runs this package's middleware.

Potential Impact

This malicious package enables remote code execution with full Node.js privileges on any system that installs and invokes the middleware, potentially allowing attackers to execute arbitrary commands, install malware, or compromise the host system. The use of an anonymous, mutable JSON paste service as a command-and-control endpoint means the attacker can dynamically update the payload executed on victims' machines.

Mitigation Recommendations

No official patch or remediation is currently documented. Users should immediately remove the chai-guid package version 1.1.5 from their projects and avoid invoking its middleware. Consider auditing dependencies for malicious packages and replacing chai-guid with trusted alternatives. Monitor for updates from the package maintainers or npm advisories for any official fixes.

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-5903
Osv Schema Version
1.7.4
Aliases
["GHSA-g8gv-g8mr-x8pc"]
Ecosystems
["npm"]

Threat ID: 6a96f319acd9273b49e4970b

Added to database: 09/01/2026, 15:45:29 UTC

Last enriched: 09/08/2026, 09:23:03 UTC

Last updated: 10/03/2026, 13:24:37 UTC

Views: 28

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