MAL-2026-16060

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/selfcerts/MAL-2026-16060.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-16060
Published
2026-09-09T00:48:17Z
Modified
2026-09-09T01:45:05Z
Summary
Malicious code in selfcerts (npm)
Details

-= Per source details. Do not edit below this line.=-

Source: amazon-inspector (ef5688e6ff2ef3728556e4e455154ad9a8f6c44670eee611d55adb3cba250536)

index.js reads sample/cert.pem, strips the BEGIN/END CERTIFICATE header and footer, base64-decodes the body, and eval()s the result. The decoded bytes are a JavaScript IIFE that base64-decodes a hardcoded URL (http://144.172.104.211/settings/privacy.php), fetches its response over plain HTTP, and pipes the body into a detached python3 process via stdin, executing whatever the remote host returns. The loader (loadSampleCertificate) is invoked unconditionally at the top of the exported generateCertificates() API, so any consumer that uses the package as advertised triggers remote code execution on the installer's host. Presenting an executable payload as a PEM certificate and nesting the C2 URL under a second base64 layer is deliberate obfuscation with no legitimate role in a certificate-generation library.

Database specific
{
    "malicious-packages-origins": [
        {
            "id": "IN-MAL-2026-019732",
            "import_time": "2026-09-09T01:28:58.470487366Z",
            "modified_time": "2026-09-09T00:48:17Z",
            "sha256": "ef5688e6ff2ef3728556e4e455154ad9a8f6c44670eee611d55adb3cba250536",
            "source": "amazon-inspector",
            "versions": [
                "1.0.0"
            ]
        }
    ]
}
References
Credits

Affected packages

npm / selfcerts

Package

Affected ranges

Affected versions

1.*
1.0.0

Database specific

cwes
[
    {
        "cweId": "CWE-506",
        "description": "The product contains code that appears to be malicious in nature.",
        "name": "Embedded Malicious Code"
    }
]
indicators
{
    "evidence_files": [
        {
            "path": "index.js",
            "sha256": "573f647718e2574c7581ba4df8a9614f969d01dea2a38907822180e2fd242854",
            "tlsh": "2e51138569e2b9a204e79674450b9010b42cd143f70afcab769e87d06f16e6cd17eecc"
        },
        {
            "path": "sample/cert.pem",
            "sha256": "010bda5b6c0fe7050d10b3b864fddc1276e44eb83da83861418bd288acff91e2",
            "tlsh": "971144035e620ccf4390e4be2adc82c304ae43d6248262fd458f47adbabc10605fc2a0"
        }
    ],
    "package_integrity": [
        {
            "filename": "selfcerts-1.0.0.tgz",
            "hashes": {
                "sha1": "2af18f35c6ce01d177f1ea8ee0ed1bda2accf1af",
                "sha512_sri": "sha512-9JTatE1kDNcGK6K1SaEOFyLvLfU1SEQTlbXxFBv15Gwmhn08d1tI8Mzr/aCd2cfDGfw/fNyYsC+uDN8vSHht0w=="
            }
        }
    ]
}
source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/selfcerts/MAL-2026-16060.json"