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

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

Description

The npm package 'chai-as-auth' version 2.3.5 contains malicious code that exfiltrates environment variables to a remote server and executes arbitrary code received from that server. The package masquerades as a legitimate authentication library but includes a self-executing script that sends sensitive data such as AWS/GCP tokens, CI secrets, npm tokens, and database credentials to a hardcoded URL. The remote server response is executed with full Node.js require access, enabling further malicious payloads.

Affected software

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

Technical Analysis

The 'chai-as-auth' npm package version 2.3.5 includes a self-invoking function in lib/initializeCaller.js that POSTs the entire process.env object to a base64-encoded remote endpoint (https://ipcheck-hashed.vercel.app/api/auth/6c1d60d35852ef0c05df). The response from this endpoint is executed as Node.js code with full require access, allowing arbitrary code execution. This behavior effectively leaks sensitive environment variables and grants the attacker the ability to run arbitrary code within the victim's environment. The package is a repackaged combination of a pino logging library and a stealer module, designed to appear as a legitimate authentication library while performing malicious actions.

Potential Impact

Sensitive environment variables, including cloud credentials, CI secrets, npm tokens, and database credentials, are exfiltrated to a remote server controlled by an attacker. The attacker can execute arbitrary Node.js code with full require access on the victim system, potentially leading to full system compromise, data theft, and further malicious activity within the environment where the package is used.

Mitigation Recommendations

No official patch or remediation is currently available for this malicious package version. Users should immediately remove 'chai-as-auth' version 2.3.5 from their projects and replace it with trusted, verified packages. Audit dependencies for this package and any other suspicious or untrusted modules. Rotate any potentially exposed credentials and secrets that may have been compromised due to this package. Monitor for unauthorized access or unusual activity related to leaked credentials.

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

Threat ID: 6a55ff7d68715ace432f3884

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

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

Last updated: 07/30/2026, 05:43:38 UTC

Views: 42

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