express-self-destruct
This report shows the evidence for express-self-destruct@1.0.0, the only known version.
OpenSSF/OSV Malicious Advisory
imported 3mo ago · by OpenSSF/OSVOpenSSF/OSV advisory MAL-2026-5553 confirms this npm version as malicious.
Advisory
MAL-2026-5553
Source
OpenSSF Malicious Packages via OSV
Summary
Malicious code in express-self-destruct (npm)
Details
On `npm install`, the package's `postinstall` hook (`node scripts/inject.js`) walks up from the install directory to locate the consumer's project root and identifies their Express entry file (the project's `package.json` `main`, or fallbacks like `index.js` / `app.js` / `server.js`). It then appends a hidden code block to that source file that registers an undocumented `GET /robots.txt` handler on the consumer's Express app. When the handler is reached with the query string `?verify=destroy`, it executes `pkill -f node...` / `taskkill /IM node.exe /F` / `npx pm2 delete all` to terminate Node processes and runs `fs.rm(<projectDir>/src, { recursive: true, force: true })` to recursively delete the project's source tree. The same destructive primitive is also exposed via the package's public API: `index.js` exports `armSelfDestruct(app, options)`, which registers the same remote process-kill + filesystem-wipe endpoint at runtime. Two install-time-destructive properties are present concurrently: (a) install-time mutation of the consumer's own source files to plant a permanent backdoor that survives uninstalling the package, and (b) a remote, unauthenticated kill switch reachable over HTTP once the modified server is running. The package additionally pulls in two same-author scoped runtime dependencies (`@my_name_is_khn/express-security-tool`, `@my_name_is_khn/express-security-tool-v1`) which are auto-installed transitively.
## Source: ghsa-malware (81107d0fbf3a18906bab53d51d8a25346f971d565350003147bf98f40378d9a4) Any computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.
References
Source & flagged code
0 flagged · loading sourceNo flagged code excerpts are attached to this scan.
Findings
1 High
HighOsv Malicious Advisory
Affected versions and remediation
This report applies to express-self-destruct@1.0.0.
The versions list below shows the verdict for each recorded version.
- Avoid installing express-self-destruct@1.0.0. Remove it from direct dependencies and check your lockfile for transitive copies.
- Choose an independently verified alternative or release. This report does not establish that other versions are safe.
- If this version ran, investigate the affected machine and build environment. Rotate credentials it could access and rebuild from a trusted environment.
Evidence last updated: .
Source advisory published: .
This report uses published external intelligence. The advisory does not provide a separate source-code analysis for each listed version.
Think this verdict is wrong? Dispute it on GitHub or read how reports are produced.