Skip to main content

Malicious code in self-certificates (npm)

0
Critical
Published: 08/26/2026 (08/26/2026, 19:13:44 UTC)
Source: GCVE Database
Product: self-certificates

Description

The npm package 'self-certificates', advertised as a self-signed TLS certificate generator, contains malicious code embedded within a fake RSA private key file (test/key.pem). This file's base64-decoded content is JavaScript that fetches data from a remote URL and executes it via a detached, hidden Python process. The package uses a PEM wrapper to smuggle JavaScript code that is then executed by a dependency, effectively acting as a multi-stage dropper for arbitrary attacker-controlled code on the installer's machine. Installation or use of this package can lead to full system compromise.

Affected software

npmghsa
self-certificates
Affected versions
=1.1.2=1.2.5=1.2.3=1.1.9=1.0.9=1.1.1=1.0.2=1.2.2=1.1.7=1.0.5=1.0.8=1.2.6=1.2.8=1.0.6=1.2.4=1.1.4=1.1.3=1.1.8=1.2.9=1.0.7=1.1.6=1.1.5=1.2.7=1.0.3=1.2.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/10/2026, 06:25:04 UTC

Technical Analysis

The 'self-certificates' npm package includes a malicious payload disguised as a self-signed TLS certificate. The key.pem file contains base64-encoded JavaScript that, when decoded and executed by the 'self-sign' dependency, fetches remote code from 'https://aptupdate.org/settings/privacy.php' and executes it in a hidden Python3 process. This technique uses a PEM format wrapper to smuggle and execute arbitrary code, resulting in a multi-stage dropper that compromises the host system upon installation or execution of the package.

Potential Impact

Any system with this package installed or running is considered fully compromised. The attacker gains arbitrary code execution capabilities, potentially leading to complete control over the affected machine. All secrets and keys stored on the compromised system should be considered exposed and must be rotated immediately from a secure, unaffected environment. Removing the package alone does not guarantee removal of all malicious artifacts or backdoors.

Mitigation Recommendations

No official patch or fix is indicated in the available data. Immediate removal of the 'self-certificates' package is recommended. Due to the high likelihood of full system compromise, all credentials and keys stored on the affected system should be rotated from a different, secure machine. Conduct a thorough investigation and system remediation to ensure no persistent malicious code remains.

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-14543
Osv Schema Version
1.7.4
Aliases
["GHSA-rwg4-cx82-h5hq"]
Ecosystems
["npm"]

Threat ID: 6a905405acd9273b4969731e

Added to database: 08/27/2026, 15:13:09 UTC

Last enriched: 09/10/2026, 06:25:04 UTC

Last updated: 10/01/2026, 22:11:15 UTC

Views: 85

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