Skip to main content
MalwarePublished Updated

self-certificate (npm) · Malicious Code

Affects self-certificateSource GCVE Database

0

Malicious package : remove self-certificate and rotate any secrets on hosts that installed it.

Data as of 26 Jun 2026, 22:16 UTC

Classification

Malicious package

Published to npm · OSV MAL-2026-5644

What to do

Remove self-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

ProductAffectedFixed in
npmself-certificateAffected
  • =1.0.0
  • =1.1.0
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 'self-certificate' versions 1.0.0 and 1.1.0 contains malicious code disguised as a self-signed certificate generator. Its generateCertificates() API loads a fake PEM file that is actually a base64-encoded JavaScript payload. This payload fetches a concealed command-and-control URL and executes the retrieved data via a detached, hidden Python process, creating a remote code execution backdoor for any user invoking the API.

References

Community reviews

Loading reviews…