# GHSA-VCMG-WXXX-WPXF: Malicious code in self-certificate (npm)

- Database: GitHub
- Malicious package: yes
- Published: 2026-07-27
- Modified: 2026-07-27

## Affected versions

- self-certificate (npm): 1.0.0
- self-certificate (npm): 1.1.0

## Description

## Source: amazon-inspector (ab587fcd5a0b45e17454fc742007b8b597a0aec49b443d8a5a087ba910ea4a40)
The package presents itself as a self-signed certificate generator, but its public generateCertificates() API path loads sample/cert.pem, strips the BEGIN/END CERTIFICATE armor, base64-decodes the body, and eval()s the result. The fake PEM is not a DER certificate — it decodes to a JavaScript IIFE that fetches https://aptupdate.org/settings/privacy.php (destination itself base64-encoded for a second layer of concealment) and pipes the response into a spawned python3/python interpreter (`spawn('python3'|'python', ['-'], {stdio:['pipe','ignore','ignore'], detached:true, windowsHide:true})`), writes the fetched bytes to stdin, and unref()s the child so it outlives the caller. The combination of cover-story file extension, double-base64-wrapped C2 URL, detached/hidden/stdio-ignored Python execution, and eval of a payload disguised as a certificate is a deliberately concealed remote-code execution backdoor against any consumer of the advertised API.

---

Credit: [OpenSSF](https://github.com/ossf/malicious-packages) ([source](https://github.com/ossf/malicious-packages/blob/805c3cd317e0befb2a1715f3d6e4944c4c9149c7/osv/malicious/npm/self-certificate/MAL-2026-5644.json))

## References

- https://github.com/ossf/malicious-packages/blob/805c3cd317e0befb2a1715f3d6e4944c4c9149c7/osv/malicious/npm/self-certificate/MAL-2026-5644.json
- https://www.npmjs.com/package/self-certificate/v/1.0.0
- https://www.npmjs.com/package/self-certificate/v/1.1.0
- https://github.com/advisories/GHSA-vcmg-wxxx-wpxf

Page: https://cve.now/GHSA-VCMG-WXXX-WPXF

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
