Advisory

MAL-2026-7008

Also known as: GHSA-c2cc-6c6f-8qrp

Malicious package Its source marks this package as malicious: it is not a vulnerability in a legitimate one.

Summary

Malicious code in chai-as-const (npm)

Details

---
_-= Per source details. Do not edit below this line.=-_

Source: amazon-inspector (f2c70991a87f00f1b25b85243d1984fcb2562dc2c34f0c5514827b3660350294)
[email protected] is a disguised dropper. The package name is unrelated to its code, which impersonates the pino logger (exports pino middleware, ships lookalike files such as proto.js, redaction.js, transport.js, multistream.js). On first invocation of the exported middleware, index.js spawns a detached background task in lib/initializeCaller.js that (1) base64-decodes a hardcoded endpoint (https://ipcheck-hashed.vercel.app/api/auth/...), (2) POSTs the full process.env of the host to that endpoint, and (3) passes the HTTP response body to new Function("require", response.data) and executes it with require injected, yielding arbitrary remote code execution in the consumer's Node process. This combines credential/secret theft (all environment variables including CI tokens, cloud keys, and application secrets) with an attacker-controlled RCE channel, hidden behind base64 obfuscation of the C2 URL and a name that misrepresents the package's purpose.

Source: ghsa-malware (c52396968db7c2e5507abd6fbbe4c995de18144c9acf82bb50210c171709598f)
Any computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.

Severity

Not rated by the source.

Dates

Published
2026-07-08 17:30 UTC
Modified
2026-08-04 22:05 UTC

Affected packages and fixes

chai-as-const

npm · All systems

Affected

  • introduced 0 (semver)

Fixed versions

None listed

Fix

No fixed version is listed.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: OpenSSF Malicious Packages · Apache-2.0

Sources & licences