x509-escaping (npm) · Malicious Code
Affects x509-escapingSource GCVE Database
Malicious package : remove x509-escaping and rotate any secrets on hosts that installed it.
Data as of 19 Sep 2026, 01:35 UTC
Malicious package
Published to npm · OSV MAL-2025-889
What to do
Remove x509-escaping from every project, lockfile and image that pulls it in. Treat any host that installed it as compromised: rotate the credentials, tokens and keys it could read, from a clean machine.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
npmx509-escapingpkg:npm/x509-escapingOther threats | Affected
| Fixed in– |
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
Description
The x509-escaping npm package contains malicious code that executes automatically during installation. This code collects sensitive system information including hostname, username, home directory, DNS servers, and reads system files such as /etc/passwd and /etc/hosts. The collected data is then exfiltrated via HTTPS to an attacker-controlled out-of-band domain. The package does not provide legitimate library functionality and appears designed solely for reconnaissance and data theft during dependency installation.