Skip to main content

libexpat EUVDEUVD-2026-137446

| CVE-2026-137951 MEDIUM
Out-of-bounds Read (CWE-125)
2026-11-27 VulnCheck GHSA-76gj-4ccc-qrh6
6.3
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

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

  1. Access
    Reach app using libexpat built XML_GE=0 + XML_UNICODE
  2. Exploit
    Submit XML with DOCTYPE declaring general entity
  3. Execution
    Trigger OOB read in storeSelfEntityValue()
  4. Impact
    Leak adjacent static memory or crash parser

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, read limits
MITRE ATT&CK

1 technique across 1 tactic: Collection

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

Exploitation Conditions

Exploitation requires that libexpat be compiled with BOTH XML_GE=0 (general-entity support disabled at build time) and XML_UNICODE (wide/UTF-16 XML_Char), as confirmed by the description and the PR's wchar_t/EXPAT_GE=OFF test configuration - this is a non-default build, and the default narrow-char, XML_GE=1 builds used by most distributions and bindings are not affected. The vulnerable application must then parse attacker-supplied XML containing a DOCTYPE that declares a general entity, which reaches storeSelfEntityValue(). Limiting factors: the specific compile-time combination sharply narrows the affected population despite libexpat's broad deployment, and the CVSS AC:H/AT:P metrics indicate the trigger is not fully attacker-controlled under default conditions; impact is confined to a small information disclosure of adjacent static memory or a denial of service via crash.

Impact

This is a comparatively low-urgency issue despite libexpat's enormous install base, because the flaw only exists in a narrow build configuration. The CVSS 4.0 vector (AV:N/AC:H/AT:P/PR:N/UI:N) describes a network-reachable, unauthenticated trigger but with both high attack complexity and a present attack requirement (AT:P), and impact limited to VC:L/VA:L - a partial information leak of adjacent static memory or a parser crash, with no integrity impact. Crucially, the vulnerability only manifests when libexpat is compiled with XML_GE=0 AND XML_UNICODE simultaneously, which is not the default build; mainstream distributions and language bindings (e.g. CPython) build with general-entity support enabled and narrow characters, so they are not affected. No EPSS score, KEV listing, or SSVC exploitation data was supplied, and no public exploit was provided - only the vendor patch PR, a source-line pointer, and the VulnCheck advisory. The vuln.today priority of 'this_month' aligns with this profile: a real but non-emergency defect. Net: a genuine bug worth patching on a normal cadence, not a high-CVSS-but-low-real-risk mislabel, but its real-world exposure is gated almost entirely by the uncommon XML_GE=0 + XML_UNICODE build rather than by severity.

Exploit ScenarioDerived

An application linked against a libexpat built with XML_GE=0 and XML_UNICODE parses attacker-controlled XML. The attacker submits a document whose DOCTYPE declares a general entity; because narrow string literals ('&', ';') are treated as wide XML_Char strings in storeSelfEntityValue(), the parser reads out of bounds, either exposing adjacent static memory through the returned entity value or crashing the process. No public exploit was identified, and the network-but-high-complexity vector (AC:H/AT:P) means exploitation is constrained rather than trivial.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.6% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Nov 27, 2026

Out-of-bounds read in libexpat 2.6.0 through 2.11.0 lets an attacker who supplies XML with a DOCTYPE general entity declaration expose adjacent static memory through the resolved entity value or crash the parser, but only when the library is compiled with both XML_GE=0 and XML_UNICODE. Remote, unauthenticated attackers are the relevant threat model (PR:N in the assessed vector), though the non-default build combination and the AC:H/AT:P metrics mean the trigger is not fully attacker-controlled under default conditions; impact is limited to low confidentiality and low availability loss. No public exploit code has been identified at time of analysis, the issue is not in CISA KEV, and the vulnerability is reported by VulnCheck with an upstream fix proposed in PR #1534.

RemediationAI

An upstream fix is available as PR #1534 (https://github.com/libexpat/libexpat/pull/1534), which converts the two narrow literals in storeSelfEntityValue() to XML_Char arrays; a released, tagged patched version is not independently confirmed in the supplied data, so verify against the libexpat release notes before claiming a fixed version number. Until that release is consumed, the most reliable mitigation is to eliminate the offending build combination: rebuild without XML_UNICODE (narrow XML_Char, the default) or with XML_GE=1 (the default general-entity setting), since the independent assessment confirms those configurations are not affected - the trade-off being that this gives up the compile-time hardening that XML_GE=0 was intended to provide. Vendored copies must be patched or reconfigured in the downstream product itself; upgrading a system libexpat package will not help applications that statically embed the library. If neither rebuild nor patch is feasible, prevent the affected parser from processing untrusted XML containing DOCTYPE entity declarations, or run such parsing in a sandboxed, memory-isolated process so that an out-of-bounds read cannot expose adjacent memory or take down a shared service.

Affected VersionsENISA

libexpat 2.6.0 ≤2.11.0

Affected Packages

euvd libexpat no fix

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 abstracts its character type through XML_Char: default builds use narrow char, while XML_UNICODE switches the parser to wide characters (UTF-16/wchar_t on Windows-style builds, confirmed by the PR adding a wchar_t CI job). XML_GE controls general-entity support at compile time, and XML_GE=0 builds omit the usual general-entity machinery. The root cause, a CWE-125 out-of-bounds read, is in storeSelfEntityValue(), which constructs entity values from hardcoded narrow string literals ("&" and ";") declared as const char *. In a wide-character build those byte literals are consumed as if they were XML_Char wide strings, so the parser reads past the end of the short literal into adjacent static memory; the leaked bytes may surface in the entity value or the read may fault and terminate parsing. The referenced source range (expat/lib/xmlparse.c lines 8042-8054 at commit bbdb35e8) is exactly this code. The upstream fix in PR #1534 replaces both literals with proper XML_Char arrays built from ASCII_AMP/ASCII_a/ASCII_m/ASCII_p/ASCII_SEMI constants plus a null terminator, and adds a MinGW/clang CI configuration using -DEXPAT_CHAR_TYPE=wchar_t -DEXPAT_DTD=OFF -DEXPAT_GE=OFF to keep this combination covered. The trigger path requires the application to parse attacker-supplied XML whose DOCTYPE declares a general entity; how an individual deployment reaches that path depends on the application, and default narrow-char XML_GE=1 builds used by most distributions and language bindings are not affected.

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 (VulnCheck) PRIMARY 6.3 MEDIUM
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:L/VI:N/VA:L/SC:N/SI:N/SA:N
vuln.today AI 4.8 MEDIUM

Attacker-supplied XML needs no auth (PR:N) but depends on an uncommon XML_GE=0 + XML_UNICODE build, so AC:H; impact is a limited memory leak (C:L) or crash (A:L) with no integrity effect.

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

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
High
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
None
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

libexpat 2.6.0 through 2.11.0 built with XML_GE=0 and XML_UNICODE contains an out-of-bounds read in storeSelfEntityValue() because narrow string literals are treated as wide strings. Attackers can supply an XML document whose DOCTYPE declares a general entity to expose adjacent static memory through the entity value or crash the parser.

Threat Intelligence Overview

EPSS Score
0.6%
Top 60% exploitable
Prevalence
Ubiquitous
libexpat embedded everywhere, but the vulnerable XML_GE=0 + XML_UNICODE build is rare
Data Quality
4 sources
Confidence: Medium

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.6%
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
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
High

Priority Score

33
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +32
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.

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

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

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