Skip to main content

libexpat CVE-2026-56406

| EUVDEUVD-2026-38183 MEDIUM
Integer Overflow or Wraparound (CWE-190)
2026-06-21 mitre GHSA-v2j6-3q6q-gm3g
6.9
CVSS 3.1 · Vendor: mitre
View

Attack ChainAIDerived

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

  1. Access
    Supply crafted XML stream to target application
  2. Delivery
    Application calls XML_ParseBuffer incrementally
  3. Exploit
    Accumulate len values to overflow m_parseEndByteIndex
  4. Execution
    Corrupt internal parser offset state
  5. Persist
    Achieve heap write primitive
  6. Impact
    Execute arbitrary code in application context

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Integer overflow checks
MITRE ATT&CK

1 technique across 1 tactic: Execution

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

Exploitation Conditions

The vulnerable code path is only reachable when an application explicitly calls XML_ParseBuffer rather than XML_Parse - a developer choice that is common in streaming and zero-copy parsing patterns but not universal. The integer overflow is triggered when the cumulative sum of the len arguments passed across successive XML_ParseBuffer calls exceeds XML_INDEX_MAX for the parser's signed index type. In practice this requires the attacker to supply an extremely large total volume of XML data - or a carefully crafted sequence of buffer lengths - to a session using XML_ParseBuffer. Applications that cap input size before calling the library are less exposed. The CVSS AC:H rating reflects this non-trivial triggering condition. No authentication is assigned by the provided CVSS vector (PR:N), but the AV:L assignment means the NVD considers local access to be the baseline requirement; in network-facing applications that pass attacker-controlled XML to XML_ParseBuffer, this local constraint does not apply.

Impact

The provided CVSS 3.1 vector (AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:L) scores 6.9 and assigns a local attack vector with high complexity. The local designation is notable and warrants scrutiny: libexpat is a library, not a service, so the NVD assessors may have determined that triggering the overflow requires local delivery of a crafted buffer - e.g., via a file or IPC channel - rather than a direct network socket. However, libexpat is pervasively embedded in network-facing daemons, and in those contexts an attacker supplying a crafted XML stream over the network would effectively achieve AV:N. This is a meaningful discrepancy - defenders using CVSS AV:L in isolation may under-prioritize patching in network-facing deployments. AC:H reflects the precision required to engineer an integer wraparound to a useful heap primitive rather than merely a crash. No EPSS data was provided in the input; no CISA KEV listing exists, and no POC has been identified, suggesting exploitation risk is currently theoretical. The high C and I impact scores are credible given the potential for heap corruption enabling code execution. Overall this is a real patching priority for any system using libexpat before 2.8.2, particularly in network-exposed contexts, despite the moderate overall CVSS score.

Exploit ScenarioDerived

An attacker controls XML content processed by an application using XML_ParseBuffer in incremental mode - for example, a document editor, a messaging daemon, or a network service consuming XML-encoded data. By crafting a sequence of buffer chunks whose cumulative byte lengths cause m_parseEndByteIndex to overflow XML_INDEX_MAX, the attacker corrupts internal parser state. Depending on heap layout, this could enable arbitrary write primitives leading to code execution in the context of the parsing application. No public exploit code has been identified at time of analysis, and successful exploitation requires careful heap-grooming, placing this in the proof-of-concept development stage rather than widespread automated exploitation.

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

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

Alert me

AnalysisAIv1 – Jun 22, 2026

Integer overflow in libexpat's XML_ParseBuffer function allows potential heap corruption leading to high-confidentiality and high-integrity impact in all libexpat versions before 2.8.2. The overflow occurs because XML_ParseBuffer lacked a bounds check on the byte index accumulator that was already present in the sibling XML_Parse function - a defensive guard omitted asymmetrically between two code paths. Any application that routes XML input through XML_ParseBuffer (a common pattern in incremental parsing) is exposed. No public exploit has been identified at time of analysis and no KEV listing exists, but the high C and I CVSS impact ratings reflect the potential for code execution via heap corruption.

RemediationAI

Upgrade libexpat to version 2.8.2 or later, which introduces the overflow guard in XML_ParseBuffer mirroring the check already in XML_Parse. The upstream fix is available at https://github.com/libexpat/libexpat/pull/1255. Downstream consumers of libexpat must rebuild or redeploy against the patched library version. If immediate patching is not possible, consider restricting the maximum size of XML inputs accepted by affected applications at an application or network perimeter layer - for example, enforcing a Content-Length or read-buffer cap below the threshold at which m_parseEndByteIndex can overflow XML_INDEX_MAX. This is a mitigating control only and does not eliminate the vulnerability; it reduces the attack surface by preventing the specific integer arithmetic from being reached. Vendors bundling libexpat should consult https://nvd.nist.gov/vuln/detail/CVE-2026-56406 and the VulDB advisory at https://vuldb.com/vuln/372641 for additional context. No patch version beyond 2.8.2 has been independently confirmed at time of analysis - verify against the upstream release page.

Affected VersionsENISA

libexpat 0 <2.8.2

Affected Packages

euvd libexpat fix: 2.8.2

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 XML parsing library used by Python's xml.etree, Apache httpd, PHP, DBus, and many others. It exposes two primary parsing entry points: XML_Parse for single-call use and XML_ParseBuffer for incremental or zero-copy buffer parsing. The root cause is CWE-190 (Integer Overflow or Wraparound): the accumulator field m_parseEndByteIndex is a signed integer that tracks how many bytes have been processed. When XML_ParseBuffer adds the caller-supplied len to this field without checking for overflow (as confirmed by the GitHub PR #1255 diff), the result can wrap around to a negative or small positive value. This corrupts internal state used for offset calculations and could facilitate writes to arbitrary heap locations. The fix adds a pre-check: if len > XML_INDEX_MAX - parser->m_parseEndByteIndex, parsing is aborted with XML_ERROR_NO_MEMORY, mirroring a check already present in XML_Parse.

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.9 MEDIUM
AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:L
vuln.today AI 7.7 HIGH

AV:N reflects libexpat's pervasive use in network services; AC:H retained for integer overflow precision; no auth or interaction required.

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

Primary rating from Vendor (mitre).

CVSS VectorVendor: mitre

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

Lifecycle Timeline

1
Patch available
Jun 21, 2026 - 17:01 EUVD

DescriptionCVE.org

libexpat before 2.8.2 has an integer overflow in XML_ParseBuffer because it lacked a check that was present in XML_Parse.

Threat Intelligence Overview

EPSS Score
0.1%
Top 99% exploitable
Social Media
1
Sightings
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment MSRC Vendor CIRCL GitHub VulDB

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.1%
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
Defer
Exploitation
None
System Exposure· derived
Small
Automatable
No
Human Impact· derived
Medium
Technical Impact
Total

Priority Score

34
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +34
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.

Integer overflow occurs when an arithmetic operation produces a result that exceeds the maximum value a given integer type can store.

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

Vendor StatusVendor

SUSE

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

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