Skip to main content

libexpat CVE-2026-76641

| EUVDEUVD-2026-63493 HIGH
Out-of-bounds Read (CWE-125)
2026-08-20 VulnCheck GHSA-r6r4-8m79-7vvv
8.7
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

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

  1. Access
    Craft XML document with external entity declaration
  2. Delivery
    Deliver payload to application parsing untrusted XML
  3. Exploit
    Application calls XML_ExternalEntityParserCreate triggering dtdCopy
  4. Execution
    dtdCopy allocates undersized NAME_AND_DEFAULT_ATTRIBUTE entries
  5. Persist
    storeAtts reads attIndex past allocated buffer boundary
  6. Impact
    Wild pointer dereference causes segfault and process crash

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 three concurrent conditions: (1) the target application links libexpat in an affected version (≤2.8.3 incorporating the CVE-2026-66046 fix); (2) the application accepts attacker-supplied XML input without sanitizing or rejecting external entity references; and (3) external entity resolution is active - the application must call XML_ExternalEntityParserCreate() in response to an external entity declaration in the DTD. The CVSS 4.0 vector (PR:N, AC:L, AT:N) confirms no authentication or special attack conditions are required beyond delivering the malformed XML payload over the network. Applications that disable external entity processing (a recommended security hardening step) are fully immune. Services that parse only internal or schema-validated XML with no user-controlled content are not practically exploitable. The regression origin of this flaw means applications running a libexpat version predating the CVE-2026-66046 fix are unaffected by this specific code path, though they may carry the original CVE-2026-66046 flaw instead.

Impact

The CVSS 4.0 score of 8.7 (AV:N/AC:L/AT:N/PR:N/UI:N/VA:H) accurately reflects a network-reachable, unauthenticated, low-complexity path to a high-availability impact. The primary risk multiplier is libexpat's broad embedding - crashes propagate to any application in the call stack using the library. The availability impact is clear (segfault), while the 'Information Disclosure' tag in the intelligence data suggests the OOB read may also expose adjacent heap memory contents, though this secondary vector is not confirmed by the CVSS vector (VC:N/VI:N). The CVSS 4.0 vector shows no confidentiality or integrity impact at the vulnerable-system level, aligning with the description's primary outcome of a crash; the whitespace normalization failure represents a functional correctness issue rather than a security boundary violation. No KEV listing and no confirmed POC reduce immediate exploitation pressure, but the straightforward trigger mechanism - a crafted XML document with external entities - requires no special tooling, lowering the practical barrier for exploitation. Applications that have disabled external entity resolution are fully protected. The regression nature of this flaw (introduced by the CVE-2026-66046 fix) means that only versions incorporating that prior fix are affected within the ≤2.8.3 window, though EUVD conservatively lists all versions through 2.8.3 as affected.

Exploit ScenarioDerived

An attacker submits a crafted XML document containing an external entity declaration pointing to an attacker-controlled or arbitrary URI to a web service, document processor, or API endpoint that uses libexpat for parsing. The application calls XML_ExternalEntityParserCreate() to resolve the entity, triggering dtdCopy() to copy the DTD with undersized hash-table entries; storeAtts() subsequently reads the attIndex field beyond the allocated buffer boundary, causing a wild pointer dereference and segfault that crashes the hosting process. Repeated submissions achieve persistent denial of service against the target service.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.3% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Aug 20, 2026

Out-of-bounds read in libexpat through 2.8.3 allows remote unauthenticated attackers to crash any application that parses attacker-controlled XML with external entity resolution enabled. The flaw - introduced as a regression by the CVE-2026-66046 fix - causes dtdCopy() to allocate hash entries with the smaller sizeof(NAMED) instead of sizeof(NAME_AND_DEFAULT_ATTRIBUTE), so storeAtts() subsequently reads the attIndex member past the end of the allocated block when handling external entity parsers created via XML_ExternalEntityParserCreate. No public exploit code or CISA KEV listing is identified at time of analysis; an upstream patch commit is available but a tagged release version has not been confirmed.

RemediationAI

The primary fix is to update libexpat to a version incorporating upstream commit 98599f6dcc2b460410881fe420f5f55d6bec63bf (PR #1331: https://github.com/libexpat/libexpat/pull/1331); a tagged release version has not been confirmed from available data, so monitor the libexpat GitHub releases page and applicable Linux distribution security channels (Debian DSA, Ubuntu USN, RHEL RHSA) for a versioned package. Where immediate upgrade is not possible, the most effective compensating control is to disable external entity resolution in the affected application: if the application does not require external entity fetching, configure the XML parser to reject external entity references, which prevents XML_ExternalEntityParserCreate() from being invoked and fully eliminates the vulnerable code path - note this may break legitimate XML workflows that depend on external DTD or entity references. Applications that process only internally-generated or fully-trusted XML with no attacker-supplied content may tolerate a brief deferral but should still prioritize patching given libexpat's attack surface breadth.

Affected VersionsENISA

libexpat 0 ≤2.8.3

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 (CPE: cpe:2.3:a:libexpat:libexpat:*:*:*:*:*:*:*:*) is a stream-oriented C XML 1.0 parser widely embedded in Python (pyexpat), PHP XML functions, Apache httpd mod_dav, Perl, and numerous Linux userspace tools. The root cause is CWE-125 (Out-of-bounds Read) arising from a struct size mismatch in dtdCopy() in xmlparse.c: the lookup() call allocates hash-table entries for default attribute tracking using sizeof(NAMED) - the smaller base struct - when it must use sizeof(NAME_AND_DEFAULT_ATTRIBUTE), which adds the attIndex integer and an initialized boolean. When an external entity parser is created via XML_ExternalEntityParserCreate(), dtdCopy() propagates DTD state to the child parser with these undersized allocations. Downstream, storeAtts() reads attIndex from the undersized block to determine whether whitespace normalization is required for non-CDATA attributes, reading past the end of allocated memory. The outcome is either silent failure to normalize whitespace (data integrity degradation) or a wild pointer dereference that causes a segfault. The source code diff in PR #1331 confirms the fix: lookup() is updated to request sizeof(NAME_AND_DEFAULT_ATTRIBUTE) and conditionally initializes attIndex and initialized fields only on first encounter, consistent with the XML 1.0 R4 spec rule that the first attribute declaration is binding.

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 8.7 HIGH
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
vuln.today AI 7.5 HIGH

Network-delivered crafted XML requires no authentication (PR:N); scope unchanged; impact is availability loss via segfault with no confirmed confidentiality or integrity breach.

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

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

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

DescriptionCVE.org

Expat through 2.8.3 contains an out-of-bounds read vulnerability that allows attackers to trigger memory corruption by processing XML with external entity parsers created via XML_ExternalEntityParserCreate. A struct size mismatch between ELEMENT_TYPE members causes storeAtts to read the attIndex member past allocated memory boundaries, resulting in failure to normalize whitespace in non-CDATA attributes or a wild pointer dereference causing a segfault. This vulnerability was introduced by the fix for CVE-2026-66046.

Executive ViewAI

Why It Matters

libexpat through version 2.8.3 contains a vulnerability that allows remote attackers to crash any application parsing XML with external entity resolution enabled, creating a denial-of-service risk for systems relying on XML processing. Organizations with XML-dependent workflows should prioritize patching to prevent potential service outages.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.3%
Top 73% exploitable
Prevalence
High
embedded in Python, PHP, Apache httpd, and major Linux distributions
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment 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 HIGH
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.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
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact
High
Technical Impact
Partial

Priority Score

44
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +44
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-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-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-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-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

CVE-2024-45491 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: Important
Product Status
SUSE Linux Enterprise Desktop 15 SP7 Affected
SUSE Linux Enterprise High Performance Computing 12 Affected
SUSE Linux Enterprise High Performance Computing 15 SP7 Affected
SUSE Linux Enterprise Micro 5.3 Affected
SUSE Linux Enterprise Micro 5.4 Affected

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