Malicious code in self-certificate (npm)
The npm package 'self-certificate' versions 1.0.0 and 1.1.0 contains malicious code disguised as a self-signed certificate generator. Its generateCertificates() API loads a fake PEM file that is actually a base64-encoded JavaScript payload. This payload fetches a concealed command-and-control URL and executes the retrieved data via a detached, hidden Python process, creating a remote code execution backdoor for any user invoking the API.
AI Analysis
Technical Summary
The 'self-certificate' npm package (versions 1.0.0 and 1.1.0) masquerades as a self-signed certificate generator but contains a malicious backdoor. Its public generateCertificates() function reads a sample PEM file, strips certificate armor, base64-decodes the content, and eval()s it. The decoded content is a JavaScript immediately-invoked function expression (IIFE) that fetches a double-base64-encoded command-and-control URL (https://aptupdate.org/settings/privacy.php). The fetched data is piped into a spawned python3 or python interpreter process that runs detached and hidden, allowing remote code execution on the host system. This technique uses obfuscation and process hiding to evade detection and maintain persistence.
Potential Impact
This vulnerability enables remote code execution on any system that uses the affected versions of the 'self-certificate' package and calls its generateCertificates() API. The attacker can execute arbitrary Python code fetched from a remote server, potentially leading to full system compromise. The malicious payload is concealed within a file that appears to be a certificate, complicating detection.
Mitigation Recommendations
No official patch or fix is currently available for this vulnerability. Users should immediately stop using the 'self-certificate' package versions 1.0.0 and 1.1.0. Remove the package from all environments and replace it with a trusted alternative. Monitor for any suspicious Python processes spawned unexpectedly. Check vendor advisories or trusted security sources for updates regarding remediation.
Malicious code in self-certificate (npm)
Description
The npm package 'self-certificate' versions 1.0.0 and 1.1.0 contains malicious code disguised as a self-signed certificate generator. Its generateCertificates() API loads a fake PEM file that is actually a base64-encoded JavaScript payload. This payload fetches a concealed command-and-control URL and executes the retrieved data via a detached, hidden Python process, creating a remote code execution backdoor for any user invoking the API.
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The 'self-certificate' npm package (versions 1.0.0 and 1.1.0) masquerades as a self-signed certificate generator but contains a malicious backdoor. Its public generateCertificates() function reads a sample PEM file, strips certificate armor, base64-decodes the content, and eval()s it. The decoded content is a JavaScript immediately-invoked function expression (IIFE) that fetches a double-base64-encoded command-and-control URL (https://aptupdate.org/settings/privacy.php). The fetched data is piped into a spawned python3 or python interpreter process that runs detached and hidden, allowing remote code execution on the host system. This technique uses obfuscation and process hiding to evade detection and maintain persistence.
Potential Impact
This vulnerability enables remote code execution on any system that uses the affected versions of the 'self-certificate' package and calls its generateCertificates() API. The attacker can execute arbitrary Python code fetched from a remote server, potentially leading to full system compromise. The malicious payload is concealed within a file that appears to be a certificate, complicating detection.
Mitigation Recommendations
No official patch or fix is currently available for this vulnerability. Users should immediately stop using the 'self-certificate' package versions 1.0.0 and 1.1.0. Remove the package from all environments and replace it with a trusted alternative. Monitor for any suspicious Python processes spawned unexpectedly. Check vendor advisories or trusted security sources for updates regarding remediation.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-5644
- Osv Schema Version
- 1.7.4
- Aliases
- []
- Ecosystems
- ["npm"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a3ef78d27e9c79719ff497c
Added to database: 06/26/2026, 22:05:01 UTC
Last enriched: 06/26/2026, 22:16:11 UTC
Last updated: 07/30/2026, 19:31:29 UTC
Views: 21
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.