selfsigned-certificate (npm) · Malicious Code
Affects selfsigned-certificateSource GCVE Database
Malicious package : remove selfsigned-certificate and rotate any secrets on hosts that installed it.
Data as of 7 Sep 2026, 22:39 UTC
Malicious package
Published to npm · OSV MAL-2026-15623
What to do
Remove selfsigned-certificate from every project, lockfile and image that pulls it in. Treat any host that installed it as compromised: rotate the credentials, tokens and keys it could read, from a clean machine.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| npmselfsigned-certificate | Affected
| Fixed in– |
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
Description
The npm package 'selfsigned-certificate' versions 1.0.0 and 1.1.0 contain malicious code that enables remote code execution. When the generateCertificates API is called with the argument 10, it triggers a hidden code path that fetches a base64-encoded payload from a hardcoded remote endpoint and executes it via eval(). This behavior is undocumented and uses obfuscation techniques including disabled TLS verification and encoded credentials. Systems with this package installed should be considered fully compromised.