Skip to main content

libexpat CVE-2026-56131

| EUVDEUVD-2026-37976 MEDIUM
Use After Free (CWE-416)
2026-06-19 mitre GHSA-fchf-wvcc-qf9g
4.9
CVSS 3.1 · Vendor: mitre
View

Attack ChainAIDerived

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

  1. Access
    Identify application with vulnerable libexpat and re-entrant handler pattern
  2. Delivery
    Deliver crafted XML to trigger character data handler
  3. Exploit
    Handler calls XML_StopParser then XML_ResumeParser re-entrantly
  4. Execution
    Parser re-enters parse loop with stale handler stack frame
  5. Persist
    Use-after-free corrupts heap state
  6. Impact
    Memory disclosure or parser process crash

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Memory lifecycle management
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Privilege Escalation

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

Exploitation Conditions

Exploitation requires two simultaneous conditions: (1) the target application links against libexpat before version 2.8.2, and (2) the application implements a handler callback (such as XML_SetCharacterDataHandler) that calls XML_StopParser with resumable=XML_TRUE followed immediately by XML_ResumeParser on the same parser object before the handler returns. Applications that do not call XML_ResumeParser from within handler callbacks are not affected by this vulnerability regardless of libexpat version. The local attack vector designation reflects that no remote attacker can independently satisfy condition (2) - only application code can invoke XML_ResumeParser; the attacker's role is limited to supplying XML content that triggers the vulnerable handler. Exploitation is further limited by AC:H: the specific handler re-entrancy pattern must already be present in the application, which is a non-default, atypical usage of the libexpat API.

Impact

The NVD-assigned CVSS 3.1 score of 4.9 with vector AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L reflects a constrained risk profile. The local attack vector (AV:L) captures the reality that while XML data can arrive over a network, the actual trigger - calling XML_ResumeParser from within a handler - is an application-code pattern; a remote attacker supplying only XML cannot force this re-entrant call unless the consuming application already implements such a handler. AC:H correctly reflects that the vulnerable re-entrancy pattern is non-default and application-specific. No KEV listing means active exploitation is not confirmed by CISA. No public POC beyond the test harness embedded in the fix PR is identified. EPSS data was not provided in source intelligence. The vulnerability is best prioritized for applications that process untrusted XML and whose handler code explicitly calls XML_ResumeParser within a callback - a relatively niche but real usage pattern seen in streaming XML processors. Applications not using this re-entrant pattern are unaffected regardless of libexpat version.

Exploit ScenarioDerived

An attacker supplies crafted XML to an application that uses a vulnerable libexpat version and whose handler callback suspends and immediately resumes the parser from within the same handler invocation. When the character data (or similar) handler calls XML_StopParser followed by XML_ResumeParser on the active parser, libexpat re-enters the parse loop with a stale stack frame, producing a use-after-free condition that can leak heap memory contents or corrupt parser state. No public POC exploit exists at time of analysis, but the test code added in fix PR #1267 provides a clear reproduction template.

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 19, 2026

Use-after-free in libexpat before 2.8.2 allows memory corruption when XML_ResumeParser is called from within a handler callback during a policy-violation scenario. The missing call-depth guard permits re-entrant parser invocation, leaving dangling pointers in the parser's internal heap state and enabling potential information disclosure or memory corruption with low confidentiality, integrity, and availability impact. No public exploit is identified at time of analysis, and the high attack complexity (AC:H) reflects the specific re-entrant handler pattern required to trigger the flaw.

RemediationAI

Upgrade libexpat to version 2.8.2 or later, which adds the isCalledFromInsideHandler guard to XML_ResumeParser (upstream fix: https://github.com/libexpat/libexpat/pull/1267). Note that the patched version 2.8.2 is stated in the CVE description but has not been independently confirmed as a released tagged artifact; verify availability via the libexpat GitHub repository before deployment. If upgrading is not immediately feasible, the most effective compensating control is to audit application code for handler callbacks that call XML_ResumeParser on the same parser instance and remove or restructure such patterns - this eliminates the re-entrancy trigger entirely. As an additional containment measure, run XML processing in sandboxed or isolated processes (e.g., seccomp-restricted worker processes) so that any use-after-free memory corruption cannot escalate beyond the parser process boundary. There are no known network-layer mitigations because the trigger is internal to application handler logic, not directly network-addressable.

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 (Expat) is a widely-embedded C library for stream-oriented XML parsing, identified via CPE cpe:2.3:a:libexpat_project:libexpat:*:*:*:*:*:*:*:*. The vulnerability arises in the XML_ResumeParser function, which resumes a parser previously suspended via XML_StopParser. When an application's handler callback (e.g., a character data handler) suspends the parser and then immediately calls XML_ResumeParser on the same parser instance before the handler returns, libexpat lacked a guard to detect this re-entrant invocation. The fix in PR #1267 adds the check isCalledFromInsideHandler(parser) at the entry of XML_ResumeParser; without it, the parser re-enters its own parse loop while the prior handler frame is still on the call stack, corrupting internal state. The root cause class is CWE-416 (Use After Free), structurally identical to the prior CVE-2026-50219 issue, indicating a recurring class of re-entrancy defects in libexpat's handler dispatch subsystem.

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

AV:N because XML triggering the handler arrives over network; AC:H retained as the re-entrant handler pattern is a non-default application prerequisite.

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

Primary rating from Vendor (mitre).

CVSS VectorVendor: mitre

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

Lifecycle Timeline

1
Patch available
Jun 19, 2026 - 07:16 EUVD

DescriptionCVE.org

libexpat before 2.8.2 lacks handler call depth tracking for calls to XML_ResumeParser from within handlers in cases of a policy violation. Thus, a use-after-free can occur (similar to the CVE-2026-50219 situation).

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
Partial

Priority Score

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

Attack Technique

Use-after-free vulnerabilities occur when a program continues to access memory through a pointer after that memory has been deallocated.

Memory corruption occurs when a program writes data beyond the boundaries of allocated memory regions or accesses memory in unintended ways, violating the integrity of the process's address space.

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

Related Vulnerabilities in libexpat Parser Memory Safety Vulnerabilities

View all 2
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
SUSE Linux Enterprise Desktop 15 SP7 Affected
SUSE Linux Enterprise High Performance Computing 15 SP7 Affected
SUSE Linux Enterprise Micro 5.3 Affected
SUSE Linux Enterprise Micro 5.4 Affected
SUSE Linux Enterprise Micro 5.5 Affected

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