Skip to main content

Malicious code in x509-escaping (npm)

0
High
Published: 02/03/2025 (02/03/2025, 17:06:31 UTC)
Source: GCVE Database
Product: x509-escaping

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

x509-escaping
pkg:npm/x509-escaping
Affected versions
=0.0.0=0.0.1=0.0.2=1.0.1

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/19/2026, 01:35:42 UTC

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.

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-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 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