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

random-certsnpm

Advisory published Updated

random-certs is a confirmed malicious npm package (MAL-2026-17644) that executes malicious code on install (malicious version 0.0.1). Do not install it — remove it immediately and rotate any exposed credentials.

Malicious code in random-certs (npm)

MAL-2026-17644
Immediate action
Remove the package, then rotate any secrets the build/runtime could reach.
npm uninstall random-certs

What this malware does

[email protected] was published to npm on 2026-10-07 04:22 UTC by user weindeste. It presents itself as a generator of random self-signed certificates, but sample/cert.pem holds base64-encoded JavaScript between the PEM markers instead of a certificate. index.js (lines 41-52) reads that file, strips the PEM header, footer and whitespace, decodes it and passes it to eval; the exported generateCertificates calls this loader first (line 240). The decoded code downloads a file from a Google Drive link and writes it to the standard input of a detached, hidden python/python3 process whose output is discarded, so the package runs remote code that it does not ship.

Trigger: on use (generateCertificates). Type: dropper hidden in a fake certificate file.

[email protected] ships a file named sample/cert.pem that is not a certificate but base64-encoded JavaScript wrapped in BEGIN/END CERTIFICATE markers. The exported generateCertificates() in index.js strips those markers, base64-decodes the body, and eval()s the result. The recovered JavaScript fetches a hardcoded Google Drive URL (https://drive.usercontent.google.com/download?id=1y4LSiUb4PZSGjKBtEVJMDMnl3Sr7kbSy) and pipes the response into a detached, window-hidden python3 - (or python on Windows) process via stdin, executing the downloaded bytes as Python on the host. The destination URL is itself base64-nested inside the fake PEM to further hide it. A certificate-generation API covertly resolving to remote Python execution from an attacker-controlled location, with multiple layers of disguise, is a deliberate malicious payload rather than a legitimate helper.

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.

Malicious versions

1 flagged
0.0.1

Indicators of compromise (SHA-256)

e002d7cdc913cbca420ce86f079af16abcbe8dcf80da03cac0cb5127fb4f8dcc
9077ef856afc462f5d7c757a14ee2c9633386c3809e58e8f725310a33dd35112

Detection & response playbook

Malicious package
  1. Find it

    Search your lockfiles and build artifacts for random-certs (version 0.0.1).

  2. If you installed it — respond

    Remove random-certs from your project and lockfile, then assume any secrets accessible to the build or runtime were exposed: rotate API keys, tokens, and credentials, and audit for unexpected outbound activity or persistence.

  3. Did it already run?

    If random-certs was installed, its post-install payload may already have run. Removing the package does not undo that — check outbound connections and credential use from the install window onward.

Frequently asked questions

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

Campaign

GHSA-2cfv-92gp-9f6mIN-MAL-2026-021104

References

Credits

  • Amazon Inspector · finder
  • Eunsoo Kim · finder

Detect & block this

O3 blocks random-certs-class packages before install and in CI — and if it already ran, its runtime egress monitoring catches the malicious outbound activity and severs the channel.

Explore

random-certs (npm) malicious package — MAL-2026-17644 | O3 Security