Skip to main content

libexpat CVE-2026-56407

| EUVDEUVD-2026-38184 MEDIUM
Integer Overflow or Wraparound (CWE-190)
2026-06-21 mitre GHSA-r8qx-5vfx-8w6r
6.9
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 entity values totaling >INT_MAX bytes
  2. Delivery
    Submit XML to libexpat-parsing application
  3. Exploit
    doProlog pool length overflows signed integer
  4. Execution
    Heap pool metadata corrupted
  5. Impact
    Leverage corrupted heap for arbitrary read/write

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 vulnerability is reachable whenever libexpat before 2.8.2 processes an XML document containing entity declarations in the prolog - this is standard XML and requires no non-default parser configuration. The precondition is that the attacker can supply XML input whose entity values collectively accumulate to a pool length exceeding INT_MAX bytes; crafting such input requires generating extremely large entity value content, which imposes a practical size constraint on the attack payload. The CVSS AV:L vector limits the official rating to local attack scenarios, but this should be verified per deployment: any application that accepts XML from a network source, file upload, or inter-process message passes attacker data directly into the vulnerable path. Exploitation to achieve C:H/I:H (controlled heap corruption) is limited by AC:H - precise heap layout control is required, and the immediate observed behavior without a refined exploit is a graceful XML_ERROR_NO_MEMORY return rather than a crash. No authentication is required to reach the parser (PR:N) and no user interaction is needed beyond the service processing the XML.

Impact

The provided CVSS vector CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:L (score 6.9) characterizes this as a local, high-complexity attack with no authentication requirement. The AV:L classification is notable and potentially conservative: libexpat is routinely used in applications that parse XML originating from network or untrusted external sources, which would place the effective attacker-reachable attack surface at the network layer for many deployments. Security teams should treat the AV:L rating as an CVSS baseline requiring per-deployment verification rather than a universal constraint. The AC:H rating is well-supported - converting an integer overflow in a heap allocator pool to controlled memory read/write (C:H/I:H) requires precise heap layout manipulation and is nontrivial. No EPSS data was present in the provided intelligence. The absence from CISA KEV and absence of identified public exploit code further supports treating this as an important-but-not-immediately-critical issue for most environments. The A:L rating (low availability impact) is notable: the most likely immediate outcome of triggering the overflow without a refined exploit is a parser error return (XML_ERROR_NO_MEMORY) rather than a crash, which the fix confirms. Exploitation for full C:H/I:H impact remains a more complex proposition.

Exploit ScenarioDerived

An attacker submits a crafted XML document to any service or application that uses libexpat < 2.8.2 to parse externally supplied XML - such as a REST API accepting XML payloads, a file upload endpoint, or a network protocol parser. The document contains entity declarations with aggregate value content exceeding INT_MAX bytes, driving the doProlog entity value pool length past the signed integer boundary and corrupting adjacent heap metadata. No public exploit code has been identified at time of analysis, and achieving the full C:H/I:H impact from this heap corruption would require significant exploit development effort consistent with the CVSS AC:H rating.

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 before 2.8.2 allows heap corruption during XML prolog parsing when accumulated entity value pool length exceeds INT_MAX, yielding high confidentiality and integrity impact per CVSS. The flaw resides in doProlog and the related storeSelfEntityValue path, where poolLength() return values are cast to signed integers without bounds validation - a gap closed in the upstream fix via explicit INT_MAX guards. No public exploit has been identified at time of analysis and this CVE is not listed in CISA KEV, but the widespread use of libexpat as a dependency across system tools, language runtimes, and XML-processing services means the blast radius of a weaponized exploit would be broad.

RemediationAI

The primary remediation is upgrading libexpat to version 2.8.2 or later, where the integer overflow guards introduced in GitHub PR #1262 (https://github.com/libexpat/libexpat/pull/1262) eliminate the vulnerable code paths in both doProlog and storeSelfEntityValue. Applications that dynamically link against a system-provided libexpat should apply OS vendor security updates once packaged for their distribution. Applications that statically link libexpat must recompile against the patched source - a system-level package update alone will not remediate statically linked binaries, which is a common oversight in large dependency graphs. If immediate patching is blocked, a targeted compensating control is to enforce maximum XML document size and entity count limits at the application layer before passing input to expat, preventing the pool from accumulating enough data to approach INT_MAX; however, this control is application-specific and not universally configurable. Disabling external entity processing (XML_SetExternalEntityRefHandler, FEATURE_BILLIONLAUGHS protections) reduces attack surface but does not protect against this flaw, as the overflow is in the internal entity value storage path. Patch availability is confirmed upstream per PR #1262; downstream distribution packages should be monitored for release timing.

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 stream-oriented, event-driven C library for XML parsing used as a dependency by Python's pyexpat module, numerous system utilities, and many network-facing services. The root cause is CWE-190 (Integer Overflow or Wraparound): during XML document prolog processing, the doProlog function accumulates entity declaration values into a memory pool managed by poolLength(). That length value is then operated on as a signed int. If an attacker constructs XML entity declarations whose combined value data causes poolLength() to return a value exceeding INT_MAX (2,147,483,647), the subsequent signed cast wraps to a negative value, producing incorrect size arithmetic and enabling heap corruption. The GitHub PR #1262 diff confirms the fix inserts explicit guard checks - comparing (size_t)poolLength(pool) against (size_t)INT_MAX - in both doProlog and storeSelfEntityValue before returning XML_ERROR_NO_MEMORY. The tags 'Buffer Overflow' and 'Integer Overflow' both apply: the integer overflow is the root cause, and heap buffer corruption is the consequential impact.

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

libexpat commonly parses externally sourced XML justifying AV:N; heap corruption from integer overflow requires precise memory control, warranting AC:H.

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 doProlog that is related to storeEntityValue and entity textLen.

Threat Intelligence Overview

EPSS Score
0.1%
Top 99% exploitable
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment MSRC Vendor 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