CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2025-66382

The 2MB Assassin: Inside the Unfixed libexpat DoS (CVE-2025-66382)

Alon Barad
Alon Barad
Software Engineer

Feb 12, 2026·6 min read·157 visits

Executive Summary (TL;DR)

A 2MB XML file can cause libexpat to consume 25-100 seconds of CPU time due to inefficient algorithmic complexity (O(n^2)). Affects all versions through 2.7.3. Currently unfixed.

In the world of foundational software, few libraries are as load-bearing as libexpat. From Python to Apache, it parses the XML that powers the internet. CVE-2025-66382 exposes a nasty algorithmic complexity flaw in this ubiquitous library, where a specifically crafted 2MB file can lock up a CPU for nearly two minutes. As of early 2026, this vulnerability remains unfixed, leaving a massive surface area exposed to Denial of Service attacks.

The Hook: The Atlas of the Internet Shrugs

If you are reading this, you are almost certainly running code that depends on libexpat. It is the parsing engine under the hood of Python's xml.etree, PHP's XML extensions, the Apache HTTP server, Mozilla Firefox, and roughly a billion embedded devices. It is the definition of "critical infrastructure" in the open-source world.

Usually, when we talk about libexpat vulnerabilities, we are terrified of Remote Code Execution (RCE) via heap overflows. But CVE-2025-66382 is a different beast. It is not about corrupting memory; it is about wasting time. Specifically, your CPU's time.

Imagine a bouncer at a club who checks IDs. Normally, it takes 5 seconds per person. This vulnerability is like handing the bouncer an ID printed on a Mobius strip. He doesn't crash, he doesn't die, he just stands there staring at it for two minutes while the line outside (your network traffic) grows infinitely long. The scariest part? As of early 2026, the bouncer still hasn't figured out how to stop staring.

The Flaw: Weaponized Geometry

The vulnerability falls under CWE-407: Inefficient Algorithmic Complexity. In plain English, this means the developers implemented a feature where the processing time grows disproportionately to the input size.

Most parsing operations should be linear, or $O(n)$. You read a byte, you process a byte. If you double the file size, you double the processing time. However, somewhere deep in libexpat's logic—likely involving attribute normalization, namespace resolution, or entity tracking—there is a loop that behaves quadratically, $O(n^2)$, or perhaps even worse.

Here is the math of the nightmare:

  • Input: A ~2 MiB XML file (trivial size for modern bandwidth).
  • Processing Time: 25 to 100 seconds.

That is an eternity in CPU time. If an attacker sends just one of these files per second, they can permanently pin 25-100 CPU cores at 100% utilization. This isn't a "crash"; the process is technically "working correctly," just agonizingly slowly. This makes it incredibly hard for standard watchdogs to detect, as the service hasn't segfaulted—it's just effectively dead.

The Code: A Ghost in the Machine

Usually, this is the part where I show you the diff—the specific lines of C code where the developer forgot a bounds check or messed up a pointer. But I can't do that here. Why? Because there is no fix yet.

Maintainer Sebastian Pipping confirmed the issue affects all releases of libexpat. The complexity of the fix is high enough that, despite being reported in September 2025, the library remains vulnerable in February 2026. However, we can simulate the concept of the flaw.

Imagine a naive implementation of attribute uniqueness checking:

// CONCEPTUAL EXAMPLE OF O(n^2) FAILURE
// This is NOT the actual libexpat code, but illustrates the flaw.
 
void check_attribute_uniqueness(Attribute *attrs, int count) {
    for (int i = 0; i < count; i++) {
        for (int j = i + 1; j < count; j++) {
            // If we have 10,000 attributes, this inner loop runs
            // roughly 50,000,000 times.
            if (strcmp(attrs[i].name, attrs[j].name) == 0) {
                 report_error("Duplicate attribute");
            }
        }
    }
}

In the code above, if an attacker provides an XML tag with 50,000 attributes, the CPU has to perform billions of string comparisons. Modern parsers usually use hash maps to achieve $O(n)$ or $O(n \log n)$ performance.

The actual flaw in libexpat is subtle. It involves a specific, non-public trigger file that hits a "sweet spot" in the parser's state machine, forcing it into a similarly expensive computational hole. The fact that the maintainer described the fix as "not as complex as resolving recursion" but still non-trivial suggests it requires architectural changes to how state is tracked, rather than a simple one-line patch.

The Exploit: The Silent treatment

Since the specific trigger file is currently under a "freeform NDA" between the researcher and the maintainer, there is no public PoC on GitHub. However, an attacker doesn't need the exact file to understand the attack surface. They just need to fuzz the parser's complexity limits.

The Theoretical Attack Chain

  1. Reconnaissance: Identify an endpoint accepting XML. SOAP APIs, SAML authentication endpoints (SSO), and XML-RPC interfaces are prime targets.
  2. Delivery: The attacker generates an XML file roughly 2MB in size. This file likely contains thousands of nested entities, specific namespace declarations, or a massive number of attributes designed to trigger the worst-case code path.
  3. Execution: The attacker uploads the file. The server accepts it (2MB is usually well within default limits like client_max_body_size).
  4. Effect: The parsing thread hangs. It doesn't die. It sits there, burning 100% of a CPU core for nearly two minutes.

If the server is multi-threaded (like Apache Prefork), the attacker only needs to send enough requests to fill the MaxRequestWorkers pool. Once the pool is full of "zombie" workers crunching this 2MB file, the server stops responding to legitimate traffic.

The Mitigation: Holding the Fort

This is the uncomfortable part. There is no apt-get upgrade to save you right now. The vulnerability is "Unfixed" upstream. So, how do you stop your servers from melting?

1. The Stopwatch Defense (Timeouts)

If you can't fix the parser, you must kill the parser. Implement strict timeouts at the application level. No XML parsing operation for a standard web request should take more than 1 or 2 seconds.

  • Python: Use signal based timeouts or wrap parsing in a thread with a .join(timeout=2.0).
  • Web Servers: Lower your Timeout directives, though this is a blunt instrument that might kill legitimate long requests.

2. Size Limits

The trigger is ~2 MiB. While valid XML can be larger, most transactional XML (SOAP/SAML) is much smaller (under 50KB).

> [!WARNING] > Hard Limit Strategy: Configure your WAF or reverse proxy (Nginx/HAProxy) to reject XML bodies larger than 1MB unless you strictly require them. This kills the known trigger before it reaches libexpat.

3. Monitoring

Set up alerts for CPU Steal or high User CPU usage on your web nodes. If you see a plateau of 100% usage without a corresponding spike in traffic throughput (RPS), you are likely under an algorithmic complexity attack.

Official Patches

GitHubOfficial Issue Tracker

Technical Appendix

CVSS Score
6.2/ 10
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
EPSS Probability
0.02%
Top 97% most exploited

Affected Systems

libexpat <= 2.7.3Python (xml.etree, xml.sax)PHP (xml extension)Apache HTTP Server (apr-util)FirefoxLibreOfficeNode.js (node-expat)

Affected Versions Detail

Product
Affected Versions
Fixed Version
libexpat
libexpat project
<= 2.7.3None (Anticipated in 2.7.4)
AttributeDetail
CWE IDCWE-407 (Inefficient Algorithmic Complexity)
Attack VectorLocal / Remote (Context Dependent)
CVSS v3.16.2 (Medium)
ImpactDenial of Service (CPU Exhaustion)
Trigger Size~2 MiB
Exploit StatusProof of Concept Exists (Private)

MITRE ATT&CK Mapping

T1499.003Endpoint Denial of Service: Application or System Exploitation
Impact
CWE-407
Inefficient Algorithmic Complexity

The product handles input in a way that produces an algorithmic complexity that is significantly worse than the optimal complexity, allowing an attacker to cause a Denial of Service.

Known Exploits & Detection

Manual AnalysisPrivate PoC held by researcher and maintainer

Vulnerability Timeline

Vulnerability reported to maintainers
2025-09-25
Maintainer opens GitHub Issue #1076
2025-10-04
CVE-2025-66382 Assigned
2025-11-28
Public call for help on oss-security
2025-12-02
Status: Still Unfixed
2026-02-01

References & Sources

  • [1]GitHub Issue #1076
  • [2]NVD Entry
  • [3]OSS-Security Mailing List

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 4 hours ago•CVE-2026-115895
8.8

CVE-2026-115895: Code Injection via Unsanitized Import Alias in Happy DOM ECMAScript Module Compiler

CVE-2026-115895 is a high-severity code injection vulnerability (CWE-94) in the happy-dom npm package prior to version 21.0.4. The vulnerability exists within the ECMAScriptModuleCompiler component, which transforms ECMAScript module syntax into executable Node.js functions when JavaScript evaluation is enabled. Due to an incomplete fix for CVE-2026-33943, the compiler failed to validate local named import aliases against legal JavaScript identifier rules. Attackers supplying crafted module imports—specifically utilizing destructuring default initializers alongside JSON module attributes—can inject arbitrary JavaScript expressions directly into the host Node.js runtime context.

Amit Schendel
Amit Schendel
4 views•10 min read
•about 5 hours ago•CVE-2026-115883
6.0

CVE-2026-115883: Cross-Namespace Access via Dot-Delimited Labels in LangGraph Postgres and SQLite Stores

An improper input validation and authorization bypass vulnerability exists in the LangGraph storage layer affecting langgraph, langgraph-checkpoint-postgres, and langgraph-checkpoint-sqlite. Because relational store implementations serialize namespace tuples into dot-delimited strings without validating labels on read, search, delete, and batch operations, an attacker who controls a namespace label can inject periods (.) to traverse namespace boundaries and access, modify, or delete data belonging to other namespaces.

Amit Schendel
Amit Schendel
4 views•9 min read
•about 6 hours ago•CVE-2026-115886
6.5

CVE-2026-115886: Unauthenticated Server-Side Request Forgery and Unsafe Reflection in MLflow Scorer Evaluation Endpoints

CVE-2026-115886 (GHSA-2wqp-q3c6-ccj5) is a Server-Side Request Forgery (SSRF) and Unsafe Reflection vulnerability in MLflow versions 3.12.0rc0 prior to 3.17.0. Unauthenticated REST API endpoints accept serialized third-party scorer JSON payloads that are dynamically deserialized and reflectively instantiated without sanitizing constructor keyword arguments. When optional dependencies such as trulens and trulens-providers-litellm are installed, attackers can inject egress-steering arguments into the scorer payload, forcing the MLflow server to dispatch outbound HTTP requests to arbitrary internal destinations or cloud metadata services.

Alon Barad
Alon Barad
5 views•10 min read
•about 7 hours ago•CVE-2026-113872
7.5

CVE-2026-113872: Unauthenticated Process Crash in Express Multer via Late Busboy Stream Resumption

CVE-2026-113872 (GHSA-q7qp-rjg7-q26m) is a high-severity denial-of-service vulnerability affecting the multer multipart/form-data upload middleware for Node.js and Express in versions 2.0.0 through 2.4.0. When an endpoint is configured to accept multiple files using an asynchronous fileFilter callback, a crafted, truncated multipart HTTP request can trigger an unhandled error event on the underlying busboy stream parser after request teardown has already completed. Because all error listeners are stripped during teardown, Node.js treats the resulting error event as an uncaught exception and immediately terminates the server process.

Amit Schendel
Amit Schendel
6 views•12 min read
•about 8 hours ago•CVE-2026-115897
2.1

CVE-2026-115897: Cross-Site Scripting via Function Body Boundary Bypass in serialize-javascript

CVE-2026-115897 (also tracked as GHSA-m5mm-p8h7-m29v and aliased as CVE-2026-115754) is a Cross-Site Scripting (XSS) vulnerability in the Yahoo serialize-javascript npm package prior to version 7.1.3. The flaw exists in the regular expression used by escapeFunctionBody() to neutralize HTML script closing tags within serialized JavaScript functions. Because function bodies are sanitized in isolation before structural formatting is applied, a function whose string representation terminates directly with the sequence '</script' bypasses the positive lookahead check. When combined with serialization formatting options that introduce whitespace delimiters and a subsequent property that supplies a closing bracket, an attacker can prematurely terminate an enclosing HTML <script> block and inject arbitrary HTML or JavaScript into the rendered document.

Amit Schendel
Amit Schendel
6 views•13 min read
•about 9 hours ago•CVE-2026-109841
5.9

CVE-2026-109841: Subresource Integrity Verification Bypass in Node.js Undici

CVE-2026-109841 is a Subresource Integrity (SRI) verification bypass vulnerability in undici, the official HTTP/1.1 and HTTP/2 client library for Node.js that powers the global fetch() implementation. The flaw stems from improper handling of case sensitivity (CWE-178) when validating cryptographic hash algorithm tokens within SRI metadata. Because undici compared incoming algorithm identifiers against a strictly lowercase set without prior ASCII-lowercase normalization, valid uppercase or mixed-case tokens such as SHA256- or Sha384- were treated as unrecognized algorithms and discarded. Under SRI forward-compatibility rules, discarding all provided tokens results in an empty integrity list, causing undici to fail open and accept tampered HTTP response bodies without cryptographic verification.

Alon Barad
Alon Barad
5 views•9 min read