MAL-2026-6218 Malicious code in chai-as-attested (npm)

Malicious package Published
Package
chai-as-attested
Registry
npm

What is MAL-2026-6218?

MAL-2026-6218 is a malicious package in chai-as-attested, published on 19 Jun 2026.

Official description

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.

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.

What should I do about MAL-2026-6218?

Remove the package from your dependencies and lockfiles, then rotate any secrets on machines where it was installed.

Sources

Also known as GHSA-v8fp-q6g9-vj9c.

Is MAL-2026-6218 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free