LWA-2026-6036 MAL-2026-6544 ↗ confirmed malware

chai-as-persisted@6.1.9

Malicious code in chai-as-persisted (npm)

Analysis

Package chai-as-persisted is a typosquat of the real chai-as-promised assertion library. Its postinstall hook (npm run smoke:pino) executes index.js, which spawns a detached background Node.js child process (lib/initializeCaller.js). That child process decodes a base64-embedded URL (hxxps://amethyst-lorrin-26[.]tiiny[.]site/index[.]json), fetches its content via axios with a hardcoded x-secret-key header, and passes the response body to new Function.constructor("require", ...) — executing arbitrary remote code fetched from a third-party hosting site. The package bundles the real pino logger codebase as camouflage but replaces the entry point with this remote-code-execution loader.

analyzed by
Leitwacht
first seen
Jun 27, 2026, 02:49 AM
analyzed
Jun 27, 2026, 09:21 PM

Related advisories

browse all confirmed advisories →

Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.