Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

Malicious code in self-certificate (npm)

0
Critical
Published: 06/11/2026 (06/11/2026, 13:02:34 UTC)
Source: GCVE Database
Product: self-certificate

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

npmghsa
self-certificate
Affected versions
=1.0.0=1.1.0

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

AILast updated: 06/26/2026, 22:16:11 UTC

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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses