set-proto-chain@1.0.3
Malicious code in set-proto-chain (npm)
Analysis
On installation this package runs a postinstall hook (node index.js) that executes hidden code in lib/index.js. That code decodes a base64-obfuscated string (disguised as a DEV_API_KEY constant) into a remote URL, fetches a JSON document over HTTPS, and extracts a stage-2 JavaScript payload from its cookie field. It then launches a detached, backgrounded node child process, pipes the fetched JavaScript into that process via stdin for execution, and unrefs it so the stager keeps running independently of the installer. The child process discards its stdout and stderr to suppress evidence. The result is install-time download and execution of arbitrary attacker-controlled code on the victim machine.
- analyzed by
- Leitwacht
- first seen
- Jun 17, 2026, 12:52 PM
- analyzed
- Jun 17, 2026, 12:59 PM
Related advisories
- @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
- work-planner-client@1.0.0
- wordsmith-kit@1.0.0
- check-ulid@3.0.2
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.