Skip to main content

libexpat CVE-2026-141595

| EUVDEUVD-2026-140787 HIGH
Inefficient Algorithmic Complexity (CWE-407)
2026-12-02 VulnCheck GHSA-j54q-vp49-jm64
8.7
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Deliver crafted XML to parser
  2. Delivery
    Internal DTD declares many #IMPLIED attributes
  3. Exploit
    Document repeats many start tags
  4. Execution
    storeAtts() rescans valueless defaults per tag
  5. Impact
    Quadratic CPU consumption, denial of service

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V2 - Validation and Business Logic Algorithmic complexity limits
Exploitation Conditions

Exploitation requires that the application parse attacker-influenced XML with libexpat and that internal DTD (DOCTYPE) processing be active, since the attack relies on declaring many valueless (#IMPLIED) default attributes for an element and then emitting many start tags for that element - expat processes the internal DTD subset by default. The specific concrete trigger is a document pairing a large count of #IMPLIED attribute declarations in <!ATTLIST with a large number of start tags, producing quadratic work in storeAtts(). Limiting factors: applications that disable DTD/DOCTYPE processing or reject documents with internal subsets are not exposed, and only libexpat through 2.11.0 is affected; impact is confined to availability (CPU exhaustion) with no data exposure or code execution.

Impact

This is a genuine availability risk whose priority is driven by the breadth of libexpat's deployment rather than by any confirmed in-the-wild activity. The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N) describes a remote, low-complexity, unauthenticated, no-interaction attack whose only impact is to the vulnerable system's availability (VA:H; VC:N/VI:N - no confidentiality or integrity loss), consistent with CWE-407 (inefficient algorithmic complexity) and the quadratic-CPU description. The source evidence (PR #1535 and the referenced R_2_11_0 xmlparse.c lines) confirms the mechanism: storeAtts() rescans all valueless default attribute declarations for every start tag, so a DTD declaring many #IMPLIED attributes plus many start tags produces O(n*m) work. No KEV listing and no EPSS score are provided, so there is no signal of active or probabilistically-likely exploitation; the only priority signal is the vendor's 'this_week' decision label and VulnCheck's advisory. The references are a patch PR, a source-line permalink, and the VulnCheck advisory - none is exploit code - so exploitation is not demonstrated, only the defect. Net: a real, broadly-applicable DoS worth prompt patching given ubiquity and trivial attack conditions, but not an emergency absent evidence of exploitation.

Exploit ScenarioDerived

An attacker sends, or causes an application to parse, a single XML document containing an internal DTD that declares a large number of #IMPLIED (valueless) attributes for one element, followed by a large number of start tags for that element. Because storeAtts() re-scans every valueless default declaration on each start tag, CPU consumption grows quadratically, hanging or starving the parsing thread/process from one small input. No public exploit is identified at time of analysis, but the quadratic trigger is fully described in the CVE text and patch.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Dec 02, 2026

libexpat through 2.11.0 burns quadratic CPU time in storeAtts() (lib/xmlparse.c) when it parses XML whose internal DTD declares a large number of valueless #IMPLIED attributes for one element and the document then contains a large number of start tags for that element, allowing an attacker who controls parsed XML to stall or exhaust a parsing thread. The flaw is a pure algorithmic-complexity problem (CWE-407): CVSS:4.0 scores it 8.7 with AV:N/AC:L/AT:N/PR:N/UI:N and a high availability-only impact (VC:N/VI:N/VA:H), and the independent assessment concurs (CVSS:3.1 AV:N/AC:L/PR:N/UI:N with C:N/I:N/A:H), so there is no confidentiality or integrity exposure and no code execution path. Exposure depends on the deployment: applications that hand attacker-influenced XML to expat with the internal DTD subset enabled (the default behaviour) are at risk, while parsers configured to reject or skip DOCTYPE/internal subsets are not; no public exploit has been identified at time of analysis and the issue is not in CISA KEV.

RemediationAI

The primary fix is the upstream change in libexpat PR 1535 (https://github.com/libexpat/libexpat/pull/1535), which vendors should apply or adopt from the next tagged libexpat release once it is published; the vendor describes a patch as available, but the supplied data does not name a released fixed version, so confirm the tag that contains commit-equivalent code for the valueDefaultIndex logic before closing out downstream packages. Rebuild or replace every statically vendored copy, and check whether language runtimes and embedded firmware ship an affected bundled expat rather than a system package. If the patch cannot be deployed immediately, the effective compensating control is to stop attacker-influenced documents from reaching expat with an internal DTD subset: reject input containing a DOCTYPE/internal subset at the application or gateway layer before parsing, with the trade-off that legitimate DTD-using XML - the mechanism by which default attributes are defined - stops working for that endpoint. Request size caps, parse timeouts and per-connection CPU/rate limiting only raise the attacker's cost and do not remove the quadratic behaviour, since the pathological input can be small; treat them as containment, not a fix. The VulnCheck advisory at https://www.vulncheck.com/advisories/libexpat-through-2.11.0-denial-of-service-via-storeatts-default-attributes should be tracked for the final fixed-version statement.

Affected VersionsENISA

libexpat 0 ≤2.11.0

Affected Packages

euvd libexpat no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Expat is the small C XML parser embedded in a very large number of runtimes, libraries and appliances, and the CPE cpe:2.3:a:libexpat:libexpat:*:*:*:*:*:*:*:* identifies the upstream library itself rather than any single downstream consumer. The root cause is CWE-407 (Inefficient Algorithmic Complexity): in storeAtts(), for every start tag that expat reports it walks the element type's full defaultAtts array to apply defaulted attributes and to run duplicate/whitespace handling. Before the fix, that loop iterated all nDefaultAtts entries even though declarations carrying no value (for example #IMPLIED) can never contribute an attribute, so work scales as declarations times start tags. The upstream patch referenced in PR 1535 (https://github.com/libexpat/libexpat/pull/1535) adds a size_t valueDefaultIndex array and nValueDefaultIndex counter to the element type, populated in defineAttribute() only when a declaration actually carries a value, and rewrites the storeAtts() loop to iterate that index list; the same PR adjusts allocation ordering so a failed realloc leaves the element type consistent, and adds the index array to dtdCopy(), dtdReset() and dtdDestroy() so DTD copying and teardown stay correct. Regression tests in tests/basic_tests.c confirm that #IMPLIED declarations still participate in whitespace normalisation and duplicate-attribute detection and that defaults interleaved with valueless declarations are still applied. The trigger is fully described by the sources above; processing defaults for every start tag is the mechanism, and the internal DTD subset (which expat processes by default) is the required delivery vehicle.

Know when Libexpat gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 8.7 HIGH
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
vuln.today AI 7.5 HIGH

Parsing attacker-supplied XML with default internal-DTD handling needs no auth, interaction, or special config (PR:N/UI:N/AC:L), and the only impact is CPU-exhaustion availability loss (A:H, C/I:N).

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

libexpat through 2.11.0 contains a denial of service vulnerability in storeAtts() in lib/xmlparse.c that scans valueless default attribute declarations for every start tag. Attackers can supply XML with an internal DTD declaring many #IMPLIED attributes for one element followed by many start tags, causing quadratic CPU consumption.

Executive ViewAI

Why It Matters

CVE-2026-141595 is a high-severity algorithmic complexity flaw in libexpat (through 2.11.0) that allows an attacker who controls XML input to exhaust CPU resources and stall parsing threads, potentially causing service outages for applications that parse untrusted XML with internal DTD subsets enabled. While there is no confidentiality or integrity impact and no code execution path, the availability-only impact could disrupt business operations and customer-facing services. Leadership should prioritize patching and hardening XML parsing configurations to prevent denial-of-service disruptions.

Business Impact: Medium
Compensating Controls

Disable internal DTD subset processing (e.g., set XML_SetParamEntityParsing to XML_PARAM_ENTITY_PARSING_NEVER) or reject DOCTYPE declarations in XML input; implement input validation and rate limiting; monitor for anomalous CPU usage in parsing threads.

Threat Intelligence Overview

Prevalence
Ubiquitous
libexpat is embedded in countless OS packages, language runtimes, and applications
Social Media
3
Sightings
Data Quality
4 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS N/A
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
Medium

Priority Score

44
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +44
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

Related Vulnerabilities in libexpat Parser NULL Deref and DoS Flaws

View all 2
CVE-2022-25315 CRITICAL POC
9.8 Feb 18

In Expat (aka libexpat) before 2.4.5, there is an integer overflow in storeRawNames. Rated critical severity (CVSS 9.8),

CVE-2025-59375 HIGH POC
7.5 Sep 15

libexpat in Expat before 2.7.2 allows attackers to trigger large dynamic memory allocations via a small document that is

CVE-2019-15903 HIGH POC
7.5 Sep 04

In libexpat before 2.2.8, crafted XML input could fool the parser into changing from DTD parsing to document parsing too

CVE-2026-115506 HIGH POC
8.7 Oct 22

CPU exhaustion in libexpat through 2.9.0 lets remote attackers stall XML parsing workloads by supplying a moderately siz

CVE-2026-93990 HIGH POC
8.7 Sep 19

Malformed UTF-16 decoding in libexpat through 2.8.4 lets remote attackers hide XML markup from the parser: a lone high s

CVE-2022-43680 HIGH POC
7.5 Oct 24

In libexpat through 2.4.9, there is a use-after free caused by overeager destruction of a shared DTD in XML_ExternalEnti

CVE-2024-28757 HIGH POC
7.5

Alpine Linux: expat fixed in 2.6.2-r0

CVE-2017-9233 HIGH POC
7.5 Jul 25

XML External Entity vulnerability in libexpat 2.2.0 and earlier (Expat XML Parser Library) allows attackers to put the p

CVE-2026-45186 HIGH POC
7.5 May 10

Denial of service in libexpat before 2.8.1 lets remote attackers exhaust CPU by submitting moderately sized crafted XML

CVE-2013-0340 MEDIUM POC
6.8 Jan 21

expat before version 2.4.0 does not properly handle entities expansion unless an application developer uses the XML_SetE

CVE-2016-0718 CRITICAL
9.8 May 26

Expat allows context-dependent attackers to cause a denial of service (crash) or possibly execute arbitrary code via a m

CVE-2024-45492 CRITICAL
9.8 Aug 30

An issue was discovered in libexpat before 2.6.3. Rated critical severity (CVSS 9.8), this vulnerability is remotely exp

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy