Advisory

MAL-2026-6218

Also known as: GHSA-v8fp-q6g9-vj9c

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

Summary

Malicious code in chai-as-attested (npm)

Details

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

Source: amazon-inspector (88e27467366a90f482eb47476458b1f74d5a41ac63371572e527f2e60e4e0b51)
Package impersonates a pino-style logger (exports module.exports.pino, ships pino-like DEFAULT_LEVELS, keywords fast/logger/stream/json) but the exported middleware spawns a detached node lib/initializeCaller.js that fetches a JSON document from a hardcoded free file-hosting URL (https://amethyst-lorrin-26.tiiny.site/index.json) and executes the cookie field of the response via new Function.constructor('require', response)(require), granting the remote payload full Node require access. The endpoint URL and request headers are base64-encoded inside fake process.env-named constants and decoded at runtime with atob to evade scanners; the fetch is retried 5 times. Any consumer who imports the package and invokes the middleware (or runs the package's smoke script) executes attacker-controlled code on the host. The package name and pino-mimicking API surface are a lure — chai-as-attested has no relation to chai-as-promised or to pino.

Source: ghsa-malware (bb6756ece7eb10964628eea76db45ccc30a5d6b3fc01cccaafa48bce6c65d6ac)
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-06-19 15:00 UTC
Modified
2026-06-23 13:32 UTC

Affected packages and fixes

chai-as-attested

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