chai-as-synced@6.0.3
Malicious code in chai-as-synced (npm)
Analysis
A trojanized clone of the pino logger library that achieves remote code execution when the module is loaded. index.js exports a middleware function that silently spawns a detached Node.js child process running lib/initializeCaller.js. That script decodes three base64-embedded strings to obtain a remote endpoint URL (hxxps://amethyst-lorrin-26[.]tiiny[.]site/index[.]json), sends an HTTP GET request with an authorization header (x-secret-key), receives a code payload from the response, and executes it via the Function constructor with full Node.js require access — enabling arbitrary remote code execution on the installer's machine. The package name is a typosquat variant and its description is unrelated to the actual logger code it ships.
- analyzed by
- Leitwacht
- first seen
- Jun 26, 2026, 02:23 AM
- analyzed
- Jun 26, 2026, 02:25 PM
Related advisories
- env-config-f281@1.0.0
- web-pool@2.3.5
- sort-btree@2.1.4
- poxios-chain@1.3.5
- npm-scanner@1.0.0
- hex-type@3.0.2
- nullsub@1.11.15
- tavern-ai-sdk@1.0.0
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.