Skip to main content

Malicious code in selfsigned-certificate (npm)

0
Critical
Published: 08/31/2026 (08/31/2026, 17:19:45 UTC)
Source: GCVE Database
Product: selfsigned-certificate

Description

The npm package 'selfsigned-certificate' versions 1.0.0 and 1.1.0 contain malicious code that enables remote code execution. When the generateCertificates API is called with the argument 10, it triggers a hidden code path that fetches a base64-encoded payload from a hardcoded remote endpoint and executes it via eval(). This behavior is undocumented and uses obfuscation techniques including disabled TLS verification and encoded credentials. Systems with this package installed should be considered fully compromised.

Affected software

npmghsa
selfsigned-certificate
Affected versions
=1.1.0=1.0.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: 09/07/2026, 22:39:13 UTC

Technical Analysis

The 'selfsigned-certificate' npm package versions 1.0.0 and 1.1.0 include a concealed malicious code path in index.js. Invoking generateCertificates with the value 10 causes the function loadSampleCertificates() to fetch a base64-encoded JavaScript payload from a hardcoded remote URL (https://jetpack.cv/wp-json/selfsigned-certs/v3/init) using HTTP Basic Auth credentials stored as base64 literals. TLS certificate verification is disabled (rejectUnauthorized:false), allowing the payload to be fetched without verifying the server's identity. The fetched payload is decoded and executed via eval(), resulting in arbitrary remote-controlled code execution within the host Node.js process. This backdoor is hidden behind a magic-number argument and is not documented, indicating a deliberate attempt to conceal the malicious behavior. The obfuscation and fetch-and-eval pattern classify this as a remote code execution dropper targeting consumers of this package.

Potential Impact

Any system with the affected versions of the 'selfsigned-certificate' package installed or running is fully compromised. The attacker can execute arbitrary code remotely within the Node.js process, potentially leading to complete system takeover. All secrets and keys stored on the compromised system should be considered exposed and must be rotated immediately from a secure environment. Removing the package alone does not guarantee removal of all malicious artifacts or backdoors introduced by the attacker.

Mitigation Recommendations

No official patch or fix is currently documented for this malicious package. Immediate removal of the 'selfsigned-certificate' package versions 1.0.0 and 1.1.0 is strongly recommended. Systems with this package installed should be treated as fully compromised; all credentials and secrets must be rotated from a different, trusted system. Conduct a thorough incident response to identify and remediate any additional malware or persistence mechanisms. Monitor for any suspicious activity related to this compromise.

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-15623
Osv Schema Version
1.7.4
Aliases
["GHSA-3whj-3fjw-x5w8"]
Ecosystems
["npm"]

Threat ID: 6a98455dacd9273b496ab851

Added to database: 09/02/2026, 15:48:45 UTC

Last enriched: 09/07/2026, 22:39:13 UTC

Last updated: 10/03/2026, 20:04:16 UTC

Views: 105

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