CVE-2026-56131
Medium · 4.9CVSS
4.9
EPSS
0.2%
Published
Jun 19, 2026
CISA due date
—
Cloudanix analysis
Some software that reads XML files could crash or behave unpredictably when processing specially crafted input, so affected components should be updated.
- Exploitation
- Local Privilege
- Attacker needs
- Local User
- Complexity
- High
- Impact
- Denial Of Service
- Component
- Library
- Class
- Use After Free
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
libexpat versions before 2.8.2 can mishandle parser state when XML_ResumeParser is called from within XML handler callbacks after a policy violation. Because handler call depth is not tracked correctly in this path, parser-owned memory can be freed while still reachable, creating a use-after-free condition. In a vulnerable application that exposes libexpat to attacker-controlled XML, this can potentially lead to process crashes, memory corruption, or limited confidentiality/integrity impact depending on allocator behavior, build hardening, and how the embedding application uses the parser.
Why it matters to the business
Applications, services, desktop software, appliances, or language runtimes that parse untrusted XML through vulnerable libexpat versions may be exposed to reliability and data-handling risk. The most likely operational consequence is a crash or denial of service in the consuming application, with lower-probability risk of memory disclosure or unintended behavior. The current public exploitation signal is low: EPSS is 0.00135, no known exploited status is reported, it is not listed as used in ransomware campaigns, and exploit maturity is reported as none. However, libexpat is a widely embedded dependency, so exposure can exist indirectly through operating system packages, vendor products, containers, SDKs, and statically linked applications.
How an attack unfolds
An attacker first needs access to an application path that parses XML using a vulnerable libexpat build. They craft XML content and parser interaction conditions that cause a policy violation while a handler callback is active, then trigger XML_ResumeParser from within that callback. In affected versions, the parser fails to account for this nested handler call depth, allowing internal parser state to be freed while still in use. The attacker then relies on the consuming application continuing execution through the corrupted state. In many real-world cases this would result in an application crash; in more favorable conditions for the attacker, memory corruption could expose data or affect control flow. Exploitation is considered difficult because it depends on specific application integration behavior, callback usage, parser state, and memory layout.
How to fix it
Upgrade libexpat to version 2.8.2 or later wherever it is present. Because libexpat is commonly embedded, remediation should include operating system packages, container base images, language runtime dependencies, vendor appliances, bundled third-party libraries, and statically linked binaries. If direct upgrade is not immediately possible, reduce exposure by preventing vulnerable applications from parsing untrusted XML, disabling XML features or workflows that are not required, isolating XML-processing components, applying vendor-supplied backports, and running affected workloads with memory-safety hardening, least privilege, and process isolation. Rebuild and redeploy applications that statically link libexpat after updating the dependency.
How to confirm the fix worked
Confirm the installed or bundled libexpat version is 2.8.2 or later, or that the vendor has provided a backported fix for this issue. Use package manager queries, software composition analysis, container image scanning, SBOM review, and binary inspection to identify both dynamic and statically linked copies. For source-built applications, verify the build dependency was updated and the application was rebuilt against the fixed library. Where feasible, run regression tests that exercise XML parsing, suspended parsing, resume behavior, and handler callback paths. Validate that internet-facing or externally reachable XML ingestion points no longer rely on vulnerable libexpat builds.
Typical attack path
- Identify an application, service, tool, or embedded product that uses libexpat before 2.8.2 to process XML.
- Find an input vector where attacker-supplied XML is parsed, such as file import, API upload, document processing, message ingestion, or metadata parsing.
- Craft XML that causes a relevant parser policy violation while an application-defined handler callback is executing.
- Trigger a code path where XML_ResumeParser is called from within the active handler callback.
- Cause libexpat to mishandle parser state and access memory after it has been freed.
- Attempt to turn the resulting memory corruption into a crash, information exposure, or limited manipulation of application behavior.
How to detect it
There are no known public exploitation indicators specific to this vulnerability, and exploit maturity is currently reported as none. To assess possible prior exploitation, review logs and telemetry from applications that parse XML using libexpat before 2.8.2. Focus on abnormal crashes, segmentation faults, access violations, core dumps, sanitizer findings, or repeated failures immediately after XML file uploads, XML API requests, document imports, metadata parsing, or message ingestion. Useful sources include application logs, web/API gateway logs, file-upload records, document-processing job logs, container runtime events, system journals, crash reporters, EDR telemetry, core dump directories, and memory-safety tooling output. Investigate repeated malformed XML submissions, XML parsing failures followed by process termination, or crashes with stack traces involving libexpat parser resume or handler callback functions. Because this is a memory-corruption issue in a library, absence of a unique network signature does not prove non-exploitation; correlate suspicious XML inputs with process crashes and vulnerable library presence.
What your security team should do
- Inventory libexpat usage across operating systems, containers, applications, appliances, and embedded/vendor software, including transitive and statically linked copies.
- Prioritize upgrades for systems that parse XML from untrusted sources, especially exposed services, file-processing pipelines, document converters, API endpoints, and message-ingestion components.
- Upgrade to libexpat 2.8.2 or later, or apply vendor backported fixes where package versions do not directly reflect upstream numbering.
- Rebuild and redeploy internally developed software that statically links libexpat or vendors a bundled copy.
- Temporarily restrict or sandbox XML parsing workflows where immediate patching is not possible.
- Monitor for abnormal crashes or memory-corruption symptoms in XML-processing applications until remediation is complete.
- Track vendor advisories for downstream products that embed libexpat, because exposure may persist even after base operating system packages are patched.
The record
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).
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|
Related vulnerabilities
- CVE-2026-109618 PHP uses longjmp() for out-of-memory (OOM) errors to exit the current context and abort… CWE-416
- CVE-2026-109619 PHP has various global state that temporarily points into request memory. CWE-416
- CVE-2026-112402 Pillow is a Python imaging library. CWE-416
- CVE-2026-112396 Pillow is a Python imaging library. CWE-416
- CVE-2025-55654 A use-after-free in the gf_filter_pid_get_packet function (filter_core/filter_pid.c) of… CWE-416
- CVE-2026-17591 A flaw was found in libarchive. CWE-416
- CVE-2026-92392 During an upload, curl mishandles HTTP/2 `RST_STREAM` received from the server (with… CWE-416
- CVE-2026-109268 ImageMagick before 6.9.13-57 and 7.x before 7.1.2-32 contains a use after free… CWE-416