Description
libexpat before 2.8.4 lacks handler call depth tracking with custom encoding callbacks. Thus, a use-after-free can occur. NOTE: this is similar to CVE-2026-50219, CVE-2026-56131 and CVE-2026-56412.
Published: 2026-08-20
Score: 4.9 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The libexpat library, which is widely used for XML parsing, contains a flaw in earlier releases where it does not track the depth of handler calls during processing with custom encoding callbacks. This omission allows a use‑after‑free condition to occur, resulting in memory corruption that could be leveraged to cause crashes or potentially execute arbitrary code. The flaw is identified as a classic Use‑After‑Free issue (CWE‑416) and improper resource handling (CWE‑825).

Affected Systems

Affected for any installation of libexpat prior to version 2.8.4, including all derivatives that use the legacy library without the depth‑tracking patch. This includes applications that compile their own copy or link against libexpat from package managers when the version is older than 2.8.4. The vulnerability is specific to the handling of custom encoding callbacks invoked by XML input streams.

Risk and Exploitability

The CVSS score of 4.9 indicates moderate severity, and the EPSS score of < 1% suggests a very low probability of exploitation. The vulnerability is not listed in the CISA KEV catalog, implying no known deployed exploits. The primary attack vector is likely an untrusted XML source processed through a custom encoding callback; an attacker could craft XML that triggers the use‑after‑free. Because of this, upgrading to a patched version is strongly recommended.

Generated by OpenCVE AI on August 27, 2026 at 02:10 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade libexpat to version 2.8.4 or newer, which includes depth‑tracking for handler calls and fixes the use‑after‑free.
  • If the upgrade cannot be performed immediately, remove or disable any custom encoding callback usage in your XML parsing code to avoid the trigger path.
  • In environments where XML is processed from untrusted sources, consider applying strict input validation or switching to a hardened XML parser that enforces depth limits.

Generated by OpenCVE AI on August 27, 2026 at 02:10 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Debian DLA Debian DLA DLA-4765-1 expat security update
History

Thu, 27 Aug 2026 00:15:00 +0000

Type Values Removed Values Added
Title Use-After-Free in libexpat Due to Missing Handler Depth Tracking for Custom Encoding Callbacks libexpat: libexpat: Memory corruption vulnerability allows arbitrary code execution or denial of service
Weaknesses CWE-825
References
Metrics threat_severity

None

threat_severity

Moderate


Thu, 20 Aug 2026 07:45:00 +0000

Type Values Removed Values Added
Title Use-After-Free in libexpat Due to Missing Handler Depth Tracking for Custom Encoding Callbacks

Thu, 20 Aug 2026 04:45:00 +0000

Type Values Removed Values Added
Description libexpat before 2.8.4 lacks handler call depth tracking with custom encoding callbacks. Thus, a use-after-free can occur. NOTE: this is similar to CVE-2026-50219, CVE-2026-56131 and CVE-2026-56412.
First Time appeared Libexpat Project
Libexpat Project libexpat
Weaknesses CWE-416
CPEs cpe:2.3:a:libexpat_project:libexpat:*:*:*:*:*:*:*:*
Vendors & Products Libexpat Project
Libexpat Project libexpat
References
Metrics cvssV3_1

{'score': 4.9, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L'}


Subscriptions

Libexpat Project Libexpat
cve-icon MITRE

Status: PUBLISHED

Assigner: mitre

Published:

Updated: 2026-08-20T15:26:27.942Z

Reserved: 2026-08-20T04:28:04.012Z

Link: CVE-2026-76957

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Analyzed

Published: 2026-08-20T05:16:29.747

Modified: 2026-09-08T20:56:31.860

Link: CVE-2026-76957

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-08-20T04:28:04Z

Links: CVE-2026-76957 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-08-27T02:15:04Z

Weaknesses