registry  /  chai-sdk  /  1.4.7

chai-sdk@1.4.7

OSV Malicious Advisory

scanned 4h ago · by OpenSSF/OSV

OpenSSF/OSV advisory MAL-2026-6931 confirms this npm version as malicious. On require, index.js spawns a detached background node process that runs lib/initializeCaller.js. That module axios.get()s a base64-obfuscated URL (decodes to https://amethyst-lorrin-26.tiiny.site/index.json) and passes the response's `cookie` field to `new Function('require',...)` which is then invoked with the real `require`, giving the remote operator arbitrary Node.js execution inside the installer's process...

Advisory
MAL-2026-6931
Source
OpenSSF Malicious Packages via OSV
Summary
Malicious code in chai-sdk (npm)
Details
On require, index.js spawns a detached background node process that runs lib/initializeCaller.js. That module axios.get()s a base64-obfuscated URL (decodes to https://amethyst-lorrin-26.tiiny.site/index.json) and passes the response's `cookie` field to `new Function('require',...)` which is then invoked with the real `require`, giving the remote operator arbitrary Node.js execution inside the installer's process. The URL is stored as a base64 blob decoded via atob() and wrapped in a function named `initializeCaller` with comments framing it as routine middleware — deliberate cover for the exfiltration/execution primitive. The package is published as `chai-sdk` but its entrypoint exports an object named `pino` with pino's DEFAULT_LEVELS, messageKey, and mirror files (lib/proto.js, lib/multistream.js, lib/redaction.js), masquerading as the popular pino logger so consumers integrate it as a benign logging dependency. Import-time fetch is from an anonymous, mutable tiiny.site host with no pinning, hash, or signature — whatever JavaScript the operator serves runs with the consumer's Node privileges. ## Source: ghsa-malware (73f55ea2148f54488c6dd557e27e14ff69b4368dac55afc8cb336fc3bc59c853) 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.
Decision reason
OpenSSF Malicious Packages via OSV confirms chai-sdk@1.4.7 as malicious (MAL-2026-6931): Malicious code in chai-sdk (npm)

Source & flagged code

0 flagged
No flagged code excerpts are attached to this scan.

Findings

1 High
HighOsv Malicious Advisory