Skip to main content

libexpat CVE-2026-56411

| EUVDEUVD-2026-38188 MEDIUM
Integer Overflow or Wraparound (CWE-190)
2026-06-21 mitre GHSA-68vw-xv3c-52vp
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 with excessive NOTATION declarations
  2. Delivery
    xmlwf parses DOCTYPE via endDoctypeDecl callback
  3. Exploit
    notationCount signed int wraps at overflow boundary
  4. Execution
    undersized NotationList heap buffer allocated
  5. Persist
    out-of-bounds write corrupts heap
  6. Impact
    arbitrary code execution achieved

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

Exploitation requires that the xmlwf command-line utility (not the libexpat library API itself) be invoked against an attacker-controlled XML document whose DOCTYPE block contains enough NOTATION declarations to overflow a signed 32-bit integer counter - a non-default, edge-case input volume. This vulnerability does not affect network-listening services directly; it applies to environments where xmlwf is embedded in automated XML processing workflows, document validators, or developer tooling that accept untrusted file input. The high attack complexity (AC:H) reflects the need to precisely engineer the NOTATION count to cross the integer boundary. Per the CVSS vector PR:N, no privilege elevation or authentication is required to run xmlwf, but the attacker must control or influence the XML file being processed. Systems using the libexpat library API without invoking the xmlwf binary are not exposed to this specific endDoctypeDecl code path.

Impact

The CVSS 3.1 base score of 6.9 with vector AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:L calibrates risk to a local, high-complexity attack scenario where the high C:H and I:H ratings reflect the potential for heap corruption to escalate to code execution. The local attack vector (AV:L) limits the exposure surface primarily to environments where xmlwf is used in automated XML processing pipelines, build systems, or developer tooling that accept externally supplied XML - not a direct network-facing service. The high attack complexity (AC:H) further reduces realistic exploitability because the attacker must precisely engineer the NOTATION count to hit the integer boundary. No EPSS data was included in the intelligence feed, making probabilistic exploitation comparison unavailable. The absence from CISA KEV and the lack of any identified public exploit code are both meaningful signals that exploitation remains theoretical or highly targeted at this time. The upstream fix is available as GitHub PR #1263, with the target release version stated as 2.8.2 by EUVD - though this version has not been independently confirmed via a formal release tag. On balance, this is a real vulnerability warranting prompt patching for any deployment where xmlwf processes untrusted XML, but the AC:H and local vector mean it is not an immediately weaponizable network threat.

Exploit ScenarioDerived

An attacker crafts an XML file with a DOCTYPE block containing a number of NOTATION declarations sufficient to overflow a signed 32-bit integer and submits it to a CI/CD pipeline, build system, or document processing service that invokes xmlwf for XML validation. The wrapped notationCount causes an undersized heap buffer to be allocated, and the subsequent write of NotationList pointers overflows the buffer, potentially overwriting adjacent heap metadata or function pointers to redirect execution. No public proof-of-concept has been identified at time of analysis, so independent development of the overflow trigger is required.

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 the xmlwf utility bundled with libexpat before 2.8.2 enables heap corruption via XML documents containing an excessive number of NOTATION declarations in a DOCTYPE block. The flaw in endDoctypeDecl allows a crafted XML file to wrap a signed integer counter, producing an undersized heap allocation that can be overflowed with high confidentiality and integrity impact. No confirmed active exploitation (not in CISA KEV) and no public exploit code have been identified at time of analysis; vendor-released patch is available in libexpat 2.8.2.

RemediationAI

Upgrade libexpat to version 2.8.2 or later, which reintroduces the notationCount and loop variable as size_t and adds an explicit pre-multiplication overflow guard before the NotationList allocation; the upstream patch is at https://github.com/libexpat/libexpat/pull/1263. The fix version 2.8.2 should be verified against the official libexpat GitHub releases page, as the PR is the only upstream source reference in the available intelligence. If an immediate upgrade is not feasible, restrict xmlwf usage in automated pipelines to trusted, internally generated XML only and prevent processing of externally supplied or user-controlled XML documents - this eliminates the attacker-controlled input prerequisite. An upstream XML sanitizer that strips or caps NOTATION declarations in DOCTYPE blocks can serve as a compensating control, though it introduces parsing complexity and an additional attack surface. Deployments that use only the libexpat library API directly (not the xmlwf binary) are not affected by this specific endDoctypeDecl code path, but a full library upgrade is still recommended as best practice.

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

The vulnerable component is the xmlwf command-line XML well-formedness checker bundled with the libexpat C library (CPE: cpe:2.3:a:libexpat_project:libexpat:*:*:*:*:*:*:*:*), a widely deployed XML parsing library used across countless open-source and commercial projects. The root cause is CWE-190 (Integer Overflow or Wraparound): the endDoctypeDecl callback in expat/xmlwf/xmlwf.c used a signed int to accumulate the count of NOTATION declarations encountered in a DOCTYPE block. When a crafted XML document contains enough NOTATION entries to exceed INT_MAX, the counter wraps to a negative value, corrupting the size argument passed to the subsequent memory allocation (notationCount * sizeof(NotationList *)), yielding a heap buffer smaller than required and enabling an out-of-bounds write. The PR #1263 diff confirms the fix: notationCount and the loop variable i are retyped from int to size_t, and an explicit pre-multiplication overflow guard (if notationCount > SIZE_MAX / sizeof(NotationList *)) is inserted before the allocation, mirroring existing guards in xcsdup() and resolveSystemId() elsewhere in the codebase.

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

Local vector because xmlwf processes on-disk files; AC:H for required precision in crafting NOTATION count; C:H/I:H reflect heap corruption potential enabling code execution.

3.1 AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:L
4.0 AV:L/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 - 18:01 EUVD

DescriptionCVE.org

xmlwf in libexpat before 2.8.2 has an integer overflow in endDoctypeDecl via NOTATION declarations.

Threat Intelligence Overview

EPSS Score
0.1%
Top 98% exploitable
Data Quality
7 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-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: 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