CVE-2026-56132

expat: libexpat: Arbitrary Code Execution via Heap-based Buffer Overflow

Published Jun 19, 2026 CVSS 3.1 · 6.9 Medium EPSS < 1% KEV · Not listed
Description
In libexpat before 2.8.2, there is a heap-based buffer overflow in doProlog in xmlparse.c because scaffold backing array reallocation is mishandled when there is data-structure sharing across parsers.

Analysis

AI-generated

Technical impact

The issue is a heap‑based buffer overflow inside the doProlog function of libexpat's XML parser caused by mishandled reallocation of a backing array when data‑structure sharing occurs across parsers. The overflow can corrupt adjacent heap memory, potentially allowing an attacker to achieve arbitrary code execution or a denial‑of‑service if they can provide a malformed XML payload.

Affected Systems

The flaw exists in all libexpat releases older than 2.8.2. Any application that links against these versions may be vulnerable if it parses XML data. The precise impact on end systems depends on how the vulnerable library is used within those applications.

Risk and Exploitability

The CVSS score of 6.9 indicates a medium severity impact. The EPSS score of < 1% (0.00088) suggests a low probability of exploitation in the wild. This vulnerability is not listed in the CISA KEV catalog. An attacker would need to supply crafted XML to a vulnerable application; it is inferred that exploitation requires that untrusted XML reaches the vulnerable code path. Successful exploitation could corrupt the heap, potentially leading to arbitrary code execution or a denial‑of‑service.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade libexpat to version 2.8.2 or later, which fixes the reallocation flaw identified as CWE-821.
  • Recompile any applications that link against libexpat to ensure the patched library is used.
  • Add bounds‑checking logic to any custom code that reuses data structures across parser instances to prevent exceeding allocated memory, addressing CWE-821.

Generated by OpenCVE AI on June 27, 2026 at 02:51 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-4849-1 expat security update
Debian DSA Debian DSA DSA-6404-1 expat security update
History
Type Values Removed Values Added
Title Heap-Based Buffer Overflow in libexpat XML Parser expat: libexpat: Arbitrary Code Execution via Heap-based Buffer Overflow
Weaknesses CWE-131
References
Metrics threat_severity

None

threat_severity

Moderate

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Title Heap-Based Buffer Overflow in libexpat XML Parser
Type Values Removed Values Added
Description In libexpat before 2.8.2, there is a heap-based buffer overflow in doProlog in xmlparse.c because scaffold backing array reallocation is mishandled when there is data-structure sharing across parsers.
First Time appeared Libexpat Project
Libexpat Project libexpat
Weaknesses CWE-821
CPEs cpe:2.3:a:libexpat_project:libexpat:*:*:*:*:*:*:*:*
Vendors & Products Libexpat Project
Libexpat Project libexpat
References
Metrics cvssV3_1

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

Weaknesses
  • CWE-131

    Incorrect Calculation of Buffer Size

  • CWE-821

    Incorrect Synchronization

Sources

Status
PUBLISHED
Assigner
mitre
Published
Updated
Nov 10, 2026, 12:48 PM
Reserved
Jun 19, 2026, 3:00 AM
Status
Modified
Published
Jun 19, 2026, 6:17 AM
Modified
Nov 10, 2026, 1:19 PM
Severity
Moderate
Public date
Jun 19, 2026, 3:00 AM