CVE-2025-25341

7.5 HIGH

📋 TL;DR

A vulnerability in libxmljs 1.0.11 allows attackers to cause a segmentation fault and denial-of-service by parsing a specially crafted XML document that accesses the internal _ref property on entity nodes. This affects any application using the vulnerable libxmljs library to parse untrusted XML input. The impact is limited to DoS rather than code execution.

💻 Affected Systems

Products:
  • libxmljs
Versions: 1.0.11
Operating Systems: All platforms running Node.js with libxmljs
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects applications that parse XML using libxmljs. Applications not using XML parsing or using alternative libraries are not vulnerable.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete service disruption through repeated DoS attacks, potentially affecting availability of applications that rely on XML parsing.

🟠

Likely Case

Intermittent service crashes when processing malicious XML payloads, requiring application restarts.

🟢

If Mitigated

Limited impact with proper input validation and monitoring; crashes would be contained to individual processes.

🌐 Internet-Facing: MEDIUM
🏢 Internal Only: LOW

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

The GitHub issue contains proof-of-concept code. Exploitation requires sending malicious XML to a vulnerable endpoint.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 1.0.12 or later

Vendor Advisory: https://github.com/libxmljs/libxmljs/issues/667

Restart Required: Yes

Instructions:

1. Update libxmljs to version 1.0.12 or later using npm: npm update libxmljs. 2. Restart all Node.js applications using libxmljs. 3. Verify the update with npm list libxmljs.

🔧 Temporary Workarounds

Input Validation

all

Implement strict input validation to reject or sanitize XML input before parsing.

Process Isolation

all

Run XML parsing in isolated worker processes to contain crashes.

🧯 If You Can't Patch

  • Implement rate limiting on XML parsing endpoints to reduce DoS impact.
  • Deploy monitoring and automatic restart mechanisms for crashed processes.

🔍 How to Verify

Check if Vulnerable:

Check package.json or run npm list libxmljs to see if version 1.0.11 is installed.

Check Version:

npm list libxmljs

Verify Fix Applied:

Confirm libxmljs version is 1.0.12 or later with npm list libxmljs.

📡 Detection & Monitoring

Log Indicators:

  • Segmentation fault errors in application logs
  • Unexpected process termination during XML parsing

Network Indicators:

  • High volume of XML requests to parsing endpoints
  • Malformed XML payloads in network traffic

SIEM Query:

source="application.logs" AND ("segmentation fault" OR "SIGSEGV") AND "libxmljs"

🔗 References

📤 Share & Export