Skip to main content

libexpat xmlwf CVE-2026-56410

| EUVDEUVD-2026-38187 MEDIUM
Integer Overflow or Wraparound (CWE-190)
2026-06-21 mitre GHSA-638v-9w3r-gh6q
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 oversized SYSTEM identifier
  2. Delivery
    Influence victim to run xmlwf with long base path
  3. Exploit
    resolveSystemId adds lengths without overflow check
  4. Execution
    malloc receives undersized argument
  5. Persist
    Write past heap boundary
  6. Impact
    Arbitrary code execution as xmlwf process user

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 three concurrent conditions: (1) the target system must be running libexpat earlier than 2.8.2 specifically compiled for a 32-bit architecture (on 64-bit platforms, causing a size_t overflow via string lengths is practically infeasible without extraordinary path lengths exceeding petabytes); (2) the xmlwf command-line tool - not the libexpat core library - must be invoked by the victim or an automated process, meaning this code path is triggered only by xmlwf's resolveSystemId function, not by applications embedding libexpat for XML parsing; (3) the attacker must supply or influence both the XML file content (systemId in DOCTYPE SYSTEM declaration) and/or the base path argument to xmlwf such that their combined character lengths approach SIZE_MAX. Applications that use libexpat as a parsing library but do not call xmlwf are NOT affected by this specific vulnerability. Absence of authentication requirements follows from xmlwf being a local command-line tool (PR:N per CVSS), but local execution context is required.

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 signals a locally exploitable, high-complexity flaw with potentially severe memory-corruption impact. The AV:L constraint limits exposure significantly - remote unauthenticated exploitation is not indicated. AC:H reflects that triggering the overflow requires specially constructed, very long base-path and systemId strings that together approach or exceed the size_t boundary, a condition that is practically much harder on 64-bit platforms (where size_t is 64 bits and SIZE_MAX is ~18 EB) but more feasible on 32-bit builds. No EPSS score was provided in source data; no CISA KEV listing or public exploit code was identified, which aligns with the AC:H complexity assessment. The real-world priority depends heavily on whether libexpat is deployed in builds that invoke xmlwf (the command-line tool, not the core parsing library) in pipelines where input XML or base paths are externally influenced. Libraries embedding libexpat for parsing (but not using xmlwf directly) are not affected by this specific code path. Net assessment: moderate priority - patch promptly in environments running xmlwf on untrusted input; lower urgency otherwise.

Exploit ScenarioDerived

An attacker with local access crafts an XML file containing a DOCTYPE declaration with an artificially long SYSTEM identifier - long enough that when combined with the base path, the combined length arithmetic overflows size_t. When a developer, CI pipeline, or build script runs xmlwf against this file (e.g., xmlwf -b /very/long/base/path malicious.xml), resolveSystemId performs the unchecked malloc with a wrapped-around (undersized) buffer, and the subsequent string copy writes beyond the heap allocation. On 32-bit libexpat builds this overflow boundary is reachable at roughly 4 GB of combined string length, though in practice heap-spray or other memory layout techniques may lower the required length to achieve controlled overwrite.

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 xmlwf tool allows an attacker supplying a crafted XML file with an excessively long DOCTYPE system identifier to trigger a heap buffer overflow via the resolveSystemId function. All libexpat versions before 2.8.2 are affected; the root cause is an unchecked size_t arithmetic operation - both the addition of string lengths and the subsequent multiplication by sizeof(XML_Char) - before a malloc call. No public exploit has been identified at time of analysis, and exploitation requires local access under high-complexity conditions per the CVSS:3.1/AV:L/AC:H vector.

RemediationAI

Upgrade libexpat to version 2.8.2 or later, which incorporates the integer-overflow guards added in PR #1252. Downstream Linux distributions and BSDs that package libexpat should be monitored for updated packages. The vendor advisory is referenced at https://nvd.nist.gov/vuln/detail/CVE-2026-56410 and the VulDB entry at https://vuldb.com/vuln/372645. Where an immediate upgrade is not feasible, restrict or eliminate the use of the xmlwf command-line tool on untrusted input, noting that this mitigation does not protect other applications that may bundle libexpat source internally. If xmlwf is used in automated pipelines, add input validation to reject XML files with abnormally long DOCTYPE system identifier strings as a compensating control - this reduces the attack surface but is not a substitute for patching. The core libexpat parsing engine is unaffected by this specific integer overflow; only environments invoking xmlwf need emergency mitigation.

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. The xmlwf command-line tool, bundled with libexpat, checks XML documents for well-formedness. The vulnerable function resolveSystemId in expat/xmlwf/xmlfile.c computes a malloc size as (tcslen(base) + tcslen(systemId) + 2) * sizeof(XML_Char) - a two-stage arithmetic operation susceptible to CWE-190 Integer Overflow. Stage one: the addition of the two string lengths plus 2 can wrap around the size_t maximum without error. Stage two: multiplying the (already potentially wrapped) result by sizeof(XML_Char) can independently overflow. Either overflow produces a malloc argument far smaller than the actual required buffer, resulting in a subsequent heap write beyond the allocated region. The fix in PR #1252 introduces explicit bounds checks using SIZE_MAX arithmetic before both the addition and multiplication, returning the raw systemId pointer as a safe fallback when overflow would occur.

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

AV:L because xmlwf requires local execution; AC:H because triggering size_t overflow demands impractically large combined string lengths, especially on 64-bit; C:H/I:H for heap corruption enabling code execution; A:L for incidental crash potential.

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:N/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

xmlwf in libexpat before 2.8.2 has an integer overflow in resolveSystemId.

Threat Intelligence Overview

EPSS Score
0.1%
Top 98% 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