Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconCraft XML with 64+ nested DTD content model declarations
-
DeliveryEmbed external parameter entity reference in DOCTYPE
-
ExploitSubmit to application with XML_PARAM_ENTITY_PARSING enabled
-
Installlibexpat creates child parser sharing parent DTD scaffIndex
-
C2Child parser's m_groupSize triggers misaligned scaffIndex realloc
-
ExecuteHeap buffer overflow corrupts adjacent allocations
-
ImpactAchieve code execution in application context
Vulnerability Assessment
| Weakness |
CWE
|
| Exploitation Conditions | Exploitation requires two concurrent conditions, both of which must be present: (1) The application must have external entity parameter parsing explicitly enabled via XML_SetParamEntityParsing with either XML_PARAM_ENTITY_PARSING_ALWAYS or XML_PARAM_ENTITY_PARSING_UNLESS_STANDALONE - this is NOT enabled by default in libexpat, meaning the application developer must have affirmatively opted into this behavior; (2) The attacker-controlled XML input must contain a DTD with deeply nested element content model declarations (the upstream test case uses 64+ levels of recursive grouping) sufficient to trigger multiple scaffold array reallocations, combined with a parameter entity reference that causes libexpat to create an external entity sub-parser that inherits the parent DTD's scaffIndex. Factors that LIMIT exploitation: external entity parsing is off by default and is frequently disabled in security-hardened builds and public-facing XML processors precisely to prevent entity-based attacks; AC:H reflects that crafting the exact nesting depth to trigger misaligned reallocation is non-trivial; AV:L in the provided CVSS suggests that standard usage ties the external entity to a local file path, meaning that attacker delivery may require influence over local file system state or the application's entity resolver implementation; no privilege on the target system is required from the attacker's perspective (PR:N). |
| Impact | The CVSS 6.9 Medium vector AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:L warrants careful interpretation. AC:H accurately reflects that two non-trivial conditions must align: deeply nested DTD element content model declarations (the test case uses 64+ nesting levels to force multiple scaffold reallocations) and active external entity parameter parsing enabled by the application. The AV:L assignment implies the external entity must reference a local file resource; however, if an application implements a custom external entity resolver or processes XML from untrusted network sources with entity parsing enabled, the effective attack surface becomes network-accessible - defenders should not rely solely on AV:L to infer that network delivery is impossible. C:H and I:H are well-supported: a heap overflow in a parsing library can yield arbitrary code execution. A:L rather than A:H is atypical for a heap overflow and likely reflects the assessor's judgment that reliable exploitation is more oriented toward control-flow hijack than crash. No EPSS score was provided in source data, leaving quantitative exploitation probability unknown. The vulnerability is not in CISA KEV, and no weaponized exploit exists beyond the upstream unit test. Despite the medium aggregate score, applications that accept untrusted XML and have external entity parsing enabled should treat remediation as urgent given the C:H/I:H impact potential. |
| Exploit ScenarioDerived | An attacker submits a crafted XML document containing a DOCTYPE with 64 or more levels of deeply nested element content model declarations followed by a parameter entity reference pointing to an external resource. When a vulnerable application with XML_PARAM_ENTITY_PARSING_ALWAYS configured processes this document, libexpat creates a child parser for the external entity that inherits the parent DTD's scaffIndex by reference. As the child parser processes additional deeply nested content model declarations, m_groupSize triggers a realloc of scaffIndex using the wrong capacity, corrupting adjacent heap memory and potentially enabling code execution. No weaponized exploit exists, but the upstream PR test case provides a functional XML reproduction template. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jun 19, 2026
Heap-based buffer overflow in libexpat before 2.8.2 allows heap memory corruption in applications that process externally-supplied XML with external entity parameter parsing enabled. The flaw resides in the doProlog function of xmlparse.c, where the scaffold backing array (scaffIndex) - used to index DTD content model tree nodes - is reallocated using the child parser's m_groupSize counter, which diverges from the actual allocated capacity of the shared scaffIndex inherited from the parent parser. No public exploit code has been identified and the vulnerability is not listed in CISA KEV at time of analysis, but the upstream fix PR includes a functional reproduction test case confirming exploitability.
RemediationAI
Upgrade libexpat to version 2.8.2 or later as stated in the CVE description. The upstream code change is available in GitHub PR #1272 (https://github.com/libexpat/libexpat/pull/1272); organizations should confirm the PR has been merged and tagged in a formal 2.8.2 release before relying on distribution packages claiming this fix, as the only provided reference is the PR rather than a release tag. As a targeted workaround for applications that cannot immediately upgrade, disable external entity parameter parsing by calling XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_NEVER) - this eliminates the shared child-parser DTD scenario required to trigger the overflow, though it will break any functionality that depends on DTD external parameter entities, which is a narrow but real compatibility trade-off. Applications that process only fully trusted, internally generated XML can de-prioritize patching, but any path that accepts externally sourced XML with external entity parsing active should be patched before other less-exposed consumers. Linux distributions (Debian, Ubuntu, Red Hat, Alpine) will ship updated expat packages; verify with each distribution's security advisory channel.
Affected VersionsENISA
Affected Packages
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:2.3:a:libexpat_project:libexpat:*:*:*:*:*:*:*:*) is a widely embedded C XML stream parser used as a dependency in Python, Perl, PHP, D-Bus, Subversion, and most Linux distributions. The root cause is CWE-821 (Incorrect Synchronization): when an application creates an external entity sub-parser via XML_ExternalEntityParserCreate, the child parser inherits the parent's DTD structure by reference, including the scaffIndex array. Prior to the fix, reallocation of scaffIndex was gated on parser->m_groupSize - a counter tracking the current parser's connector array size - rather than the actual allocated capacity of the shared DTD's scaffIndex. Because the child parser's m_groupSize can grow independently of the capacity at which the parent originally allocated scaffIndex, the realloc call operates with an incorrect size, producing a heap overflow. The fix introduces a dedicated scaffIndexSize field to the DTD structure (initialized in dtdCreate, reset in dtdReset, and copied in dtdCopy) so that scaffIndex reallocation is gated on its own tracked capacity. The prior code also erroneously interleaved scaffIndex reallocation inside the m_groupConnector reallocation block, which the fix restructures into a separate, correctly bounded allocation check.
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
AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:L
Local vector retained because standard external entity resolution targets local files; AC:H reflects required non-default configuration plus precise nesting depth; PR:N since no attacker system privilege is needed.
Primary rating from Vendor (mitre).
CVSS VectorNVD
Lifecycle Timeline
1DescriptionNVD
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.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
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.
Related Vulnerabilities in libexpat Parser Memory Safety Vulnerabilities
View all 2In Expat (aka libexpat) before 2.4.5, there is an integer overflow in storeRawNames. Rated critical severity (CVSS 9.8),
libexpat in Expat before 2.7.2 allows attackers to trigger large dynamic memory allocations via a small document that is
In libexpat before 2.2.8, crafted XML input could fool the parser into changing from DTD parsing to document parsing too
Malformed UTF-16 decoding in libexpat through 2.8.4 lets remote attackers hide XML markup from the parser: a lone high s
CPU exhaustion in libexpat through 2.9.0 lets remote attackers stall XML parsing workloads by supplying a moderately siz
In libexpat through 2.4.9, there is a use-after free caused by overeager destruction of a shared DTD in XML_ExternalEnti
Alpine Linux: expat fixed in 2.6.2-r0
XML External Entity vulnerability in libexpat 2.2.0 and earlier (Expat XML Parser Library) allows attackers to put the p
Denial of service in libexpat before 2.8.1 lets remote attackers exhaust CPU by submitting moderately sized crafted XML
expat before version 2.4.0 does not properly handle entities expansion unless an application developer uses the XML_SetE
Expat allows context-dependent attackers to cause a denial of service (crash) or possibly execute arbitrary code via a m
An issue was discovered in libexpat before 2.6.3. Rated critical severity (CVSS 9.8), this vulnerability is remotely exp
Same weakness CWE-821 – Incorrect Synchronization
View allSame technique Buffer Overflow
View allVendor StatusVendor
SUSE
Severity: Moderate| Product | Status |
|---|---|
| SUSE Linux Enterprise Desktop 15 SP7 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP7 | Affected |
| SUSE Linux Enterprise Micro 5.3 | Affected |
| SUSE Linux Enterprise Micro 5.4 | Affected |
| SUSE Linux Enterprise Micro 5.5 | Affected |
| SUSE Linux Enterprise Module for Basesystem 15 SP7 | Affected |
| SUSE Linux Enterprise Server 15 SP7 | Affected |
| SUSE Linux Enterprise Server 16.0 | Affected |
| SUSE Linux Enterprise Server 16.1 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP7 | Affected |
| SUSE Linux Enterprise Server for SAP applications 16.0 | Affected |
| SUSE Linux Enterprise Server for SAP applications 16.1 | Affected |
| SUSE Linux Micro 6.0 | Affected |
| SUSE Linux Micro 6.1 | Affected |
| SUSE Linux Micro 6.2 | Affected |
| openSUSE Leap 16.0 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP4 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP4-LTSS | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP5 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP5-LTSS | Affected |
| SUSE Linux Enterprise Module for Basesystem 15 SP4 | Affected |
| SUSE Linux Enterprise Module for Basesystem 15 SP5 | Affected |
| SUSE Linux Enterprise Module for Basesystem 15 SP6 | Affected |
| SUSE Linux Enterprise Server 12 SP5 | Affected |
| SUSE Linux Enterprise Server 12 SP5-LTSS | Affected |
| SUSE Linux Enterprise Server 12 SP5-LTSS Extended Security | Affected |
| SUSE Linux Enterprise Server 15 SP4 | Affected |
| SUSE Linux Enterprise Server 15 SP4-LTSS | Affected |
| SUSE Linux Enterprise Server 15 SP5 | Affected |
| SUSE Linux Enterprise Server 15 SP5-LTSS | Affected |
| SUSE Linux Enterprise Server 15 SP6 | Affected |
| SUSE Linux Enterprise Server 15 SP6-LTSS | Affected |
| SUSE Linux Enterprise Server LTSS Extended Security 12 SP5 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 12 SP5 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP6 | Affected |
| SUSE Manager Proxy 4.3 | Affected |
| SUSE Manager Proxy LTS 4.3 | Affected |
| SUSE Manager Retail Branch Server 4.3 | Affected |
| SUSE Manager Retail Branch Server LTS 4.3 | Affected |
| SUSE Manager Server 4.3 | Affected |
| SUSE Manager Server LTS 4.3 | Affected |
| SUSE CaaS Platform 3.0 | Affected |
| SUSE CaaS Platform 4.0 | Affected |
| SUSE Enterprise Storage 6 | Affected |
| SUSE Enterprise Storage 7 | Affected |
| SUSE Enterprise Storage 7.1 | Affected |
| SUSE Linux Enterprise Desktop 12 | Affected |
| SUSE Linux Enterprise Desktop 12 SP1 | Affected |
| SUSE Linux Enterprise Desktop 12 SP2 | Affected |
| SUSE Linux Enterprise Desktop 12 SP3 | Affected |
| SUSE Linux Enterprise Desktop 12 SP4 | Affected |
| SUSE Linux Enterprise Desktop 15 | Affected |
| SUSE Linux Enterprise Desktop 15 SP1 | Affected |
| SUSE Linux Enterprise Desktop 15 SP2 | Affected |
| SUSE Linux Enterprise Desktop 15 SP3 | Affected |
| SUSE Linux Enterprise Desktop 15 SP4 | Affected |
| SUSE Linux Enterprise Desktop 15 SP5 | Affected |
| SUSE Linux Enterprise Desktop 15 SP6 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP1 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP1-ESPOS | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP1-LTSS | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP2 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP2-ESPOS | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP2-LTSS | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP3 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP3-ESPOS | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP3-LTSS | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP4-ESPOS | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP5-ESPOS | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP6 | Affected |
| SUSE Linux Enterprise High Performance Computing 15-ESPOS | Affected |
| SUSE Linux Enterprise High Performance Computing 15-LTSS | Affected |
| SUSE Linux Enterprise Micro 5.0 | Affected |
| SUSE Linux Enterprise Micro 5.1 | Affected |
| SUSE Linux Enterprise Micro 5.2 | Affected |
| SUSE Linux Enterprise Module for Basesystem 15 | Affected |
| SUSE Linux Enterprise Module for Basesystem 15 SP1 | Affected |
| SUSE Linux Enterprise Module for Basesystem 15 SP2 | Affected |
| SUSE Linux Enterprise Module for Basesystem 15 SP3 | Affected |
| SUSE Linux Enterprise Point of Sale 12 SP2-CLIENT | Affected |
| SUSE Linux Enterprise Real Time 15 SP2 | Affected |
| SUSE Linux Enterprise Real Time 15 SP3 | Affected |
| SUSE Linux Enterprise Real Time 15 SP4 | Affected |
| SUSE Linux Enterprise Server 12 | Affected |
| SUSE Linux Enterprise Server 12 SP1 | Affected |
| SUSE Linux Enterprise Server 12 SP1-LTSS | Affected |
| SUSE Linux Enterprise Server 12 SP2 | Affected |
| SUSE Linux Enterprise Server 12 SP2-BCL | Affected |
| SUSE Linux Enterprise Server 12 SP2-ESPOS | Affected |
| SUSE Linux Enterprise Server 12 SP2-LTSS | Affected |
| SUSE Linux Enterprise Server 12 SP3 | Affected |
| SUSE Linux Enterprise Server 12 SP3-BCL | Affected |
| SUSE Linux Enterprise Server 12 SP3-ESPOS | Affected |
| SUSE Linux Enterprise Server 12 SP3-LTSS | Affected |
| SUSE Linux Enterprise Server 12 SP4 | Affected |
| SUSE Linux Enterprise Server 12 SP4-ESPOS | Affected |
| SUSE Linux Enterprise Server 12 SP4-LTSS | Affected |
| SUSE Linux Enterprise Server 12-LTSS | Affected |
| SUSE Linux Enterprise Server 15 | Affected |
| SUSE Linux Enterprise Server 15 SP1 | Affected |
| SUSE Linux Enterprise Server 15 SP1-BCL | Affected |
| SUSE Linux Enterprise Server 15 SP1-LTSS | Affected |
| SUSE Linux Enterprise Server 15 SP2 | Affected |
| SUSE Linux Enterprise Server 15 SP2-BCL | Affected |
| SUSE Linux Enterprise Server 15 SP2-LTSS | Affected |
| SUSE Linux Enterprise Server 15 SP3 | Affected |
| SUSE Linux Enterprise Server 15 SP3-BCL | Affected |
| SUSE Linux Enterprise Server 15 SP3-LTSS | Affected |
| SUSE Linux Enterprise Server 15-LTSS | Affected |
| SUSE Linux Enterprise Server for Raspberry Pi 12 SP2 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 12 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 12 SP1 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 12 SP2 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 12 SP3 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 12 SP4 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP1 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP2 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP3 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP4 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP5 | Affected |
| SUSE Linux Enterprise Software Development Kit 12 | Affected |
| SUSE Linux Enterprise Software Development Kit 12 SP1 | Affected |
| SUSE Linux Enterprise Software Development Kit 12 SP2 | Affected |
| SUSE Linux Enterprise Software Development Kit 12 SP3 | Affected |
| SUSE Linux Enterprise Software Development Kit 12 SP4 | Affected |
| SUSE Linux Enterprise Software Development Kit 12 SP5 | Affected |
| SUSE Manager Proxy 4.0 | Affected |
| SUSE Manager Proxy 4.1 | Affected |
| SUSE Manager Proxy 4.2 | Affected |
| SUSE Manager Retail Branch Server 4.0 | Affected |
| SUSE Manager Retail Branch Server 4.1 | Affected |
| SUSE Manager Retail Branch Server 4.2 | Affected |
| SUSE Manager Server 4.0 | Affected |
| SUSE Manager Server 4.1 | Affected |
| SUSE Manager Server 4.2 | Affected |
| SUSE OpenStack Cloud 7 | Affected |
| SUSE OpenStack Cloud 8 | Affected |
| SUSE OpenStack Cloud 9 | Affected |
| SUSE OpenStack Cloud Crowbar 8 | Affected |
| SUSE OpenStack Cloud Crowbar 9 | Affected |
| openSUSE Leap 15.3 | Affected |
| openSUSE Leap 15.4 | Affected |
| openSUSE Leap 15.5 | Affected |
| openSUSE Leap 15.6 | Affected |
| openSUSE Leap Micro 5.2 | Affected |
| openSUSE Leap Micro 5.3 | Affected |
| openSUSE Leap Micro 5.4 | Affected |
| openSUSE Leap Micro 5.5 | Affected |
| suse/kiosk/xorg:21 suse/sles12sp3 | Affected |
EUVD-2026-37977
GHSA-425r-vwq2-26qv
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB