MAL-2026-17644

    Dashboard / Malicious Package / MAL-2026-17644

    MAL-2026-17644

    Published: 7 Oct 2026Last Modified: 8 Oct 2026Aliases: 
    GHSA-2cfv-92gp-9f6m

    Summary: Malicious code in random-certs (npm)

    Details: [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. Source: amazon-inspector (9077ef856afc462f5d7c757a14ee2c9633386c3809e58e8f725310a33dd35112) [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. Source: ghsa-malware (e002d7cdc913cbca420ce86f079af16abcbe8dcf80da03cac0cb5127fb4f8dcc) 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.

    Affected packages

    Package

    Name: random-certs

    Purl: pkg:npm/random-certs

    Affected ranges

    Type: SEMVER

    Events:

    Introduced- 0
    Fixed -None

    Affected versions

    0.0.1