Skip to main content

libexpat CVE-2026-72522

| EUVDEUVD-2026-54990 MEDIUM
Out-of-bounds Read (CWE-125)
2026-08-10 mitre GHSA-v867-w97p-3vx2
6.2
CVSS 3.1 · Vendor: mitre
View

Attack ChainAIDerived

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

  1. Access
    Craft XML with low surrogate at buffer boundary
  2. Delivery
    Submit to libexpat-16bit-enabled parser via network or file
  3. Exploit
    *_toUtf16 applies incorrect 0xF8 mask, matching low surrogate as high
  4. Execution
    Position pointer stalls with no forward progress
  5. Persist
    Infinite loop consumes parsing thread CPU
  6. Impact
    Target application hangs (DoS)

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, read limits
MITRE ATT&CK

1 technique across 1 tactic: Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires libexpat to be compiled with both XML_UNICODE and XML_UNICODE_WCHAR_T compile-time flags, enabling 16-bit wide-character (UTF-16) output mode. This is confirmed explicitly by the vendor's patch changelog: 'Needs Expat compiled with 16bit character support (e.g. with Firefox and/or on Windows) to be affected.' The attacker must supply XML input containing a low Unicode surrogate (U+DC00-U+DFFF) positioned to trigger the *_toUtf16 conversion, for example within attribute values or entity definitions in DOCTYPE declarations. The CVSS vector specifies PR:N/UI:N, meaning no authentication or user interaction is required from the parser's perspective once the application exposes libexpat to attacker-controlled XML. The primary limiting factor is the compile-time prerequisite: standard Linux/Unix builds of libexpat distributed without XML_UNICODE are completely immune regardless of version. Environments exclusively affected are Firefox builds and Windows-native applications embedding libexpat with wide-character support.

Impact

Two CVSS vectors exist for this CVE and they conflict materially: NVD assigned AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H (score 6.2), while the vendor's own patch changelog explicitly documents AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H (score 7.5) - the AV:L assignment appears to be an NVD error, since Firefox parsing attacker-supplied web XML represents a clear network attack vector. No EPSS score was provided in the intelligence data, so exploitation probability cannot be precisely quantified. KEV status is negative, and no confirmed active exploitation exists. A test-case payload attributed to Jason Kratzer of Mozilla is publicly available in the upstream PR, demonstrating the attack is reproducible. The compile-time gate (XML_UNICODE + XML_UNICODE_WCHAR_T) meaningfully reduces real-world attack surface - even a mid-sized IT team in malbork running standard Linux-packaged libexpat compiled without 16-bit Unicode support would be completely unaffected despite running an unpatched version. The 'Information Disclosure' tag in the intelligence metadata is misleading: the official CVSS C:N metric confirms no assessed confidentiality impact, and the mechanism is an infinite loop rather than data exfiltration. Net assessment: elevated priority for Firefox maintainers and Windows application vendors shipping libexpat; negligible priority for standard Linux/Unix deployments.

Exploit ScenarioDerived

An attacker serves a crafted XML document embedding a low surrogate code unit (e.g., U+DC00) within an attribute value or entity reference payload to a Firefox browser or a Windows application parsing attacker-controlled XML via libexpat compiled with 16-bit Unicode support. The *_toUtf16 function enters an infinite loop at the surrogate boundary, consuming 100% of the parsing thread's CPU indefinitely and rendering the XML-consuming application completely unresponsive. A concrete test-case payload demonstrating this behavior - constructed around a specific buffer boundary of approximately 1021-1025 bytes - is publicly available in PR #1296 of the upstream libexpat repository.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.2% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Aug 10, 2026

Infinite-loop denial-of-service in libexpat before 2.8.3 allows attackers supplying crafted UTF-16 XML to hang the parsing process indefinitely via a low Unicode surrogate handled as a high surrogate in the *_toUtf16 functions. The flaw is gated by a compile-time prerequisite - only builds configured with XML_UNICODE and XML_UNICODE_WCHAR_T are vulnerable - which specifically includes Firefox and Windows-native builds of applications embedding libexpat. A concrete attack payload is publicly available in the upstream patch PR test suite; no active exploitation has been confirmed via CISA KEV at time of analysis.

RemediationAI

Upgrade libexpat to version 2.8.3 or later, which incorporates the fix from PR #1296 (https://github.com/libexpat/libexpat/pull/1296). Downstream consumers such as Firefox should apply the corresponding application-level update shipping the patched libexpat as soon as their vendor releases it. If an immediate upgrade is not possible for 16-bit-enabled deployments, an application-layer workaround is to reject XML input containing lone surrogate code points (U+D800-U+DFFF) before passing content to the parser; this adds pre-processing overhead and may not cover all encoding edge cases. An alternative mitigation is to rebuild libexpat without XML_UNICODE and XML_UNICODE_WCHAR_T, which eliminates the vulnerability entirely but removes 16-bit wide-character output capability and may break dependent application features. Operators running standard Linux-packaged libexpat compiled without 16-bit support do not require remediation for this specific CVE.

Affected VersionsENISA

libexpat 0 <2.8.3

Affected Packages

euvd libexpat fix: 2.8.3

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

libexpat (CPE: cpe:2.3:a:libexpat_project:libexpat:*:*:*:*:*:*:*:*) is a widely-embedded C library for event-driven XML parsing. The defect resides in xmltok.c within the *_toUtf16 conversion functions. In UTF-16, valid surrogate pairs consist of a high surrogate (U+D800-U+DBFF) followed by a low surrogate (U+DC00-U+DFFF), totalling 4 bytes. The faulty boundary check used the bitmask 0xF8 to detect the end-of-buffer surrogate, which inadvertently matched both high and low surrogates (since 0xDC & 0xF8 0xD8 as well as 0xD8 & 0xF8 0xD8). The correct mask 0xFC distinguishes high surrogates exclusively. When a lone low surrogate appears, the parser stalls - the position pointer never advances - producing an infinite loop consistent with CWE-125 (Out-of-Bounds Read). A secondary fix in xmlparse.c tightened a conditional from inequality to a strict less-than to prevent processing beyond the expected buffer extent. The vulnerability is compile-time conditional: builds without XML_UNICODE and XML_UNICODE_WCHAR_T do not invoke the affected code paths.

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 (mitre) PRIMARY 6.2 MEDIUM
AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
vuln.today AI 5.9 MEDIUM

AV:N reflects browser and network XML parsing exposure; AC:H captures the mandatory non-default compile-time 16-bit Unicode flag; no authentication or interaction required.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
4.0 AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
SUSE 7.5 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Red Hat 6.2 MEDIUM

Primary rating from Vendor (mitre).

CVSS VectorVendor: mitre

Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

Lifecycle Timeline

2
Patch available
Aug 10, 2026 - 05:01 EUVD
CVE Published
Aug 10, 2026 - 03:28 cve.org
MEDIUM 6.2

DescriptionCVE.org

libexpat before 2.8.3 has an out-of-bounds read and resultant infinite loop because low surrogates are treated the same as high surrogates during Unicode processing in the *_toUtf16 functions.

Threat Intelligence Overview

EPSS Score
0.2%
Top 95% exploitable
Prevalence
High
widely embedded C XML parser used by Firefox, Python, Apache, and many Linux system tools
Data Quality
7 sources
Confidence: High

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 MEDIUM
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.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
Small
Automatable· derived
No
Human Impact· derived
High

Priority Score

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

Attack Technique

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

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

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

CVE-2024-45491 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

Vendor StatusVendor

SUSE

Severity: Important
Product Status
SLES15-SP5-CHOST-BYOS-SAP-CCloud Not-Affected
SLES15-SP5-CHOST-BYOS-SAP-CCloud Not-Affected
SLES15-SP6-CHOST-BYOS Not-Affected
SLES15-SP6-CHOST-BYOS-Aliyun Not-Affected
SLES15-SP6-CHOST-BYOS-Azure Not-Affected

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