Malicious code in x509-escaping (npm)
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.
AI Analysis
Technical Summary
The x509-escaping npm package declares a preinstall script that runs index.js automatically on npm install. This script gathers system information and reads sensitive files, then sends this data to a hardcoded attacker-controlled domain. The package matches a dependency-confusion reconnaissance pattern, shipping no useful library code but a malicious payload aimed at data exfiltration during installation.
Potential Impact
Sensitive system information and contents of critical files (/etc/passwd and /etc/hosts) are exposed to an attacker via out-of-band exfiltration. This can lead to privacy breaches and facilitate further attacks by revealing user and system details. The malicious behavior occurs silently during package installation, potentially affecting any system that installs this package version.
Mitigation Recommendations
No official patch or remediation is indicated in the provided data. Users should avoid installing the affected versions of the x509-escaping package (=0.0.0, =0.0.1, =0.0.2, =1.0.1). Verify package authenticity before installation and consider using trusted package sources and integrity verification mechanisms. Monitor for updates or advisories from the package maintainers or npm registry.
Malicious code in x509-escaping (npm)
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.
Affected software
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
Technical Analysis
The x509-escaping npm package declares a preinstall script that runs index.js automatically on npm install. This script gathers system information and reads sensitive files, then sends this data to a hardcoded attacker-controlled domain. The package matches a dependency-confusion reconnaissance pattern, shipping no useful library code but a malicious payload aimed at data exfiltration during installation.
Potential Impact
Sensitive system information and contents of critical files (/etc/passwd and /etc/hosts) are exposed to an attacker via out-of-band exfiltration. This can lead to privacy breaches and facilitate further attacks by revealing user and system details. The malicious behavior occurs silently during package installation, potentially affecting any system that installs this package version.
Mitigation Recommendations
No official patch or remediation is indicated in the provided data. Users should avoid installing the affected versions of the x509-escaping package (=0.0.0, =0.0.1, =0.0.2, =1.0.1). Verify package authenticity before installation and consider using trusted package sources and integrity verification mechanisms. Monitor for updates or advisories from the package maintainers or npm registry.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2025-889
- Osv Schema Version
- 1.7.4
- Ecosystems
- ["npm"]
Threat ID: 6aade4fb55bf5e2cf5eda5be
Added to database: 09/19/2026, 01:27:23 UTC
Last enriched: 09/19/2026, 01:35:42 UTC
Last updated: 09/19/2026, 01:35:42 UTC
Views: 2
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
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
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.