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

0
Critical
Published: 08/05/2026 (08/05/2026, 12:59:03 UTC)
Source: GCVE Database
Product: chai-as-rendered

Description

The npm package 'chai-as-rendered' is a typosquat of 'chai-as-promised' and contains malicious code. It spawns a detached child process that fetches and executes a remote JSON payload, giving the attacker full require access on the host system. The package uses base64 obfuscation to conceal the remote URL and request headers. The package name and keywords impersonate the legitimate 'pino' package to deceive users.

Affected software

npmghsa
chai-as-rendered
Affected versions
=1.2.0

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/05/2026, 17:19:24 UTC

Technical Analysis

The 'chai-as-rendered' npm package version 1.2.0 is a malicious typosquatting package impersonating 'chai-as-promised' and 'pino'. Its exported middleware spawns a detached child process (lib/caller.js) that fetches a JSON payload from a base64-obfuscated URL on jsonstorage.net. The fetched payload contains a 'cookie' string that is executed via a new Function constructor, granting the fetched code full require access on the installer's host environment. The remote URL and request headers are stored as base64 strings under fake environment variable names and decoded at runtime to hide the destination. This behavior allows arbitrary code execution on any system that installs this package.

Potential Impact

Installation of 'chai-as-rendered' version 1.2.0 results in arbitrary code execution with full require access on the host system. This can lead to compromise of the host environment, data theft, or further malicious activity. The obfuscation techniques used make detection more difficult.

Mitigation Recommendations

No official patch or remediation is currently available. Users should avoid installing 'chai-as-rendered' version 1.2.0. Verify package names carefully to avoid typosquatting attacks. Remove the package if already installed and audit systems for potential compromise. Monitor trusted sources for updates or advisories regarding this package.

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

Threat ID: 6a735744bf8831d539159c82

Added to database: 08/05/2026, 15:31:16 UTC

Last enriched: 08/05/2026, 17:19:24 UTC

Last updated: 08/05/2026, 17:19:24 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