MAL-2026-12349
Dashboard / Malicious Package / MAL-2026-12349
MAL-2026-12349
Summary: Malicious code in chai-assertions-plus (npm)
Details: Source: amazon-inspector (80a83cd9353779d12538e8c6b06276178f6f0c246abd7d5148ce805536cbf57f) The package is published as a Chai assertions extension, but the shipped code in index.js and lib/ is unrelated Pino logger source used as filler. Requiring the package loads lib/initializeCaller.js, which runs a top-level IIFE that shadows the global process object with a fake object whose env fields hold base64-encoded strings. At runtime those strings are atob-decoded to reconstruct a destination URL (https://amethyst-lorrin-26.tiiny.site/index.json) and an HTTP header name/value pair, an axios GET is issued to that URL, and the returned response body is passed into new Function("require", response) and invoked with the real require. This gives whoever controls the tiiny.site subdomain arbitrary code execution on the installer's machine with the package's require capability, on every import of the module. The name/description mismatch and the endpoint/header obfuscation indicate deliberate deception rather than a misconfiguration.
References: https://www.npmjs.com/package/chai-assertions-plus/v/6.0.6, https://www.npmjs.com/package/chai-assertions-plus/v/6.0.5
Affected packages
Package
Name: chai-assertions-plus
Purl: pkg:npm/chai-assertions-plus
Affected ranges
Type: N/A
Events:
