chai-as-attested@6.0.3
Malicious code in chai-as-attested (npm)
Analysis
chai-as-attested is a combosquat package impersonating the chai assertion library. When required, it spawns a detached background child process that fetches and executes remote code from a C2 endpoint. The file lib/initializeCaller.js decodes a base64-embedded URL (hxxps://amethyst-lorrin-26[.]tiiny[.]site/index[.]json) and HTTP header (x-secret-key), makes a GET request to that endpoint, and passes the response body into the Function constructor for arbitrary code execution. The package retries the fetch up to 5 times on failure. The parent process exits independently while the malicious payload runs in the background.
- analyzed by
- Leitwacht
- first seen
- Jun 18, 2026, 01:38 PM
- analyzed
- Jun 18, 2026, 01:38 PM
Related advisories
- @yhong91/vibetime@0.1.0
- @public-for-cdao/providers@1.0.1
- set-proto-chain@1.0.3
- @ravespaceio/browser-input@99.0.1
- mci-sdk@1.2.8
- chai-plugin-helper@1.7.3
- xmr-btc-lib-js@1.2.1
- xboxauthwrapper@3.9.8
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.