Skip to content

Malicious code in evilpostinstall (npm)

Malware Published Aug 31, 2026 to the GitHub Advisory Database • Updated Sep 2, 2026

Package

npm evilpostinstall (npm)

Affected versions

= 49.13.4074225
= 4127000.0.1
= 0.2.0
= 0.6.0
= 0.4.0
= 0.3.0
= 0.5.0

Patched versions

None

Description

Source: amazon-inspector (846e500b06f58769a2cb833be8e726ab1db04b327f4c614da6642eb46ae7dfe5)

The package's postinstall lifecycle hook pipes the output of env through nc to a host reconstructed at install time from the package version string via cut -b 2-4 and cut -b 5-. For version 4127000.0.1 the destination decodes to 127.0.0.1:888; the sibling artifact evilpostinstall-192.168.1.100.tgz uses the same slicing scheme to target 192.168.1.100. On npm install, the full installer environment - including any CI secrets, tokens, and API keys present in environment variables - is transmitted to the reconstructed host over TCP port 888. package.json also declares a self-referencing dependency evilpostinstall: ^4192168.1.100, whose version field encodes a second destination IP under the same scheme, causing npm to resolve and install an additional package instance whose own postinstall repeats the exfiltration against that address. The destination is deliberately hidden from static scanners by being reconstructed from the version field rather than written as an IP literal, and no source files are shipped - the manifest itself is the payload.


Credit: OpenSSF (source)

References

Published to the GitHub Advisory Database Aug 31, 2026
Reviewed Aug 31, 2026
Last updated Sep 2, 2026

EPSS score

Weaknesses

Embedded Malicious Code

The product contains code that appears to be malicious in nature. Learn more on MITRE.

GHSA ID

GHSA-2jqc-wjj7-w577

Source code

No known source code
Improvements are not currently accepted on this advisory because this package is malware and has no patched versions. If there is something to change, please open an issue at https://github.com/github/advisory-database/issues.