Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
Malicious package

self-certificatenpm

Malicious code in self-certificate (npm) Remove it immediately and rotate any exposed credentials.

MAL-2026-5644
Immediate action
Remove the package, then rotate any secrets the build/runtime could reach.
npm uninstall self-certificate

What this malware does

The package advertises itself as a self-signed certificate generator, but its main module index.js contains a loadSampleCertificate() routine that reads sample/cert.pem, strips the BEGIN/END CERTIFICATE markers, base64-decodes the body, and passes the result to eval(). The decoded blob is JavaScript (not a real DER certificate) that fetches a script from https://aptupdate.org/settings/privacy.php and pipes the response body into a detached, hidden python3 process via stdin (spawn('python3', ['-'], {detached:true, windowsHide:true})). loadSampleCertificate() is invoked at the top of the exported generateCertificates() API, so any consumer calling the package's headline function triggers attacker-controlled remote code execution on the installer's machine. The PEM-shaped wrapper around base64-encoded JavaScript is deliberate steganography to evade casual review.

Malicious versions

1 flagged
1.0.0

Indicators of compromise (SHA-256)

4a2141f4facbd3abc437287c86971f1b3bb6795fad75990624f735b72139167d

Frequently asked questions

No. self-certificate on npm has been identified as a malicious package (version 1.0.0 flagged). It should be removed immediately — do not install or keep it in your dependency tree.

Campaign

IN-MAL-2026-005730

References

Credits

  • Amazon Inspector · finder

Scan your dependencies

O3 Security blocks malicious packages like this at install time and in CI.

Supply-chain protection
self-certificate (npm) malicious package — MAL-2026-5644 | O3 Security