Skip to main content

libexpat CVE-2026-141596

| EUVDEUVD-2026-140786 HIGH
NULL Pointer Dereference (CWE-476)
2026-12-02 VulnCheck GHSA-x686-hxrw-3g44
8.2
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

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

  1. Access
    Submit crafted XML to expat-based app
  2. Delivery
    Entity expands CDATA that handler suspends
  3. Exploit
    Parser resumes with corrupted CDATA state
  4. Execution
    NULL pointer dereference in doContent()
  5. Impact
    Application crash / denial of service

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A10:2025 - Mishandling of Exceptional Conditions
ASVS 5.0
V16 - Security Logging and Error Handling Null pointer safety, defensive checks
MITRE ATT&CK

1 technique across 1 tactic: Impact

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

Exploitation Conditions

Exploitation requires the embedding application to suspend the parser (e.g., call XML_StopParser from a registered handler such as the character-data handler) WHILE processing a CDATA section that occurs INSIDE an internal general entity's expansion; the attacker then supplies an XML document containing such an entity (e.g., <!ENTITY ge 'a<![CDATA[...]]>...'>) referenced in the content. The decisive limiting factor is that applications which never use parser suspension, or never suspend inside CDATA, are not affected by default - this is a non-default application integration pattern, which is why the vendor assigns AC:H and AT:P. No attacker authentication or user interaction is needed (PR:N/UI:N), and the reachable impact is limited to a crash (availability), not code execution or data disclosure.

Impact

This is a denial-of-service-only flaw: the supplied CVSS 4.0 vector (AV:N/AC:H/AT:P/PR:N/UI:N) scores vulnerable-system availability (VA:H) with no confidentiality or integrity impact (VC:N/VI:N), consistent with CWE-476 (NULL pointer dereference causing a crash). The signals are moderate rather than alarming: AC:H and AT:P indicate the attack has preconditions and is not trivially automatable, and the vuln.today Decision label is 'this_week' (not act_now/emergency). No EPSS score, no CISA KEV entry, and no confirmed working-exploit flag are present in the input, so there is no evidence of active or widespread exploitation - the realistic risk is targeted DoS against the specific subset of applications that use expat's parser-suspension feature inside CDATA, not mass exploitation. The key limiting factor is that exploitation depends on the EMBEDDING APPLICATION suspending the parser inside a CDATA section within an internal general entity (via a data handler that calls XML_StopParser); PR:N is correct because no attacker authentication is needed, but the condition is application-behavior-dependent, which the raw score alone does not convey. Treat this as a legitimate but bounded priority: patch on a normal cadence (this week), prioritizing applications known to use XML_StopParser/suspension.

Exploit ScenarioDerived

An attacker submits a crafted XML document to a service built on libexpat (≤ 2.11.0) whose character-data handler suspends the parser while processing a CDATA section that sits inside an internal general entity. When parsing resumes, expat's doContent() mishandles the suspended CDATA state and dereferences a NULL pointer, crashing the application and denying service. The libexpat PR #1545 includes reproducer unit tests (well-formed and malformed CDATA-in-entity suspension cases) demonstrating the condition, so a public proof-of-concept reference exists, though the input does not confirm it as packaged working exploit code.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available

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

Alert me

AnalysisAIv1 – Dec 02, 2026

A NULL pointer dereference in libexpat through 2.11.0 (doContent() in lib/xmlparse.c) crashes applications that suspend the parser while it is inside a CDATA section contained in an internal general entity. Only applications whose handlers actually stop the parser (for example via XML_StopParser from a character-data handler) during such an entity's CDATA expansion are exposed, and attackers reach the bug by supplying a crafted XML document with an entity such as <!ENTITY ge 'a<![CDATA[...]]>'>; the result is a denial of service, not code execution or data disclosure. No public exploit was identified at time of analysis, and while the CVSS 4.0 base score is 8.2 (AV:N/AC:H/AT:P/PR:N/UI:N/VA:H), the vendor's own High complexity and Present attack-requirements metrics reflect that the flaw is only triggerable through that non-default integration pattern; an upstream fix is available as PR 1545 but no tagged patched release version is confirmed in the provided data.

RemediationAI

Apply the upstream fix from libexpat PR 1545 (https://github.com/libexpat/libexpat/pull/1545), which adds the insideCdata tracking field to OPEN_INTERNAL_ENTITY and routes resumption of a suspended internal entity through doCdataSection(); patch data says a vendor fix is available, but no tagged release version number is stated in the provided data, so confirm with the libexpat release notes at https://github.com/libexpat/libexpat/issues/1419 or your redistributor which build contains the commit before claiming a specific patched version, and rebuild/repackage every application that statically or dynamically links expat (including language runtimes that embed it). Where the upgrade cannot be applied immediately, the decisive exposure factor is parser suspension: eliminate or gate calls to XML_StopParser/XML_ResumeParser triggered from handlers while character data inside a CDATA section of an internal general entity is being processed, or defer suspension until the handler is outside CDATA/entity expansion - the trade-off is that applications relying on incremental/streaming suspension for flow control must buffer input or process documents in larger chunks instead. Disabling internal general entity expansion (for example by not resolving internal entities, or rejecting documents with DOCTYPE internal subsets containing entities) also prevents reaching the faulty state, at the cost of breaking legitimate XML that depends on internal entity expansion. Note that input validation and size limits do not mitigate this flaw, since the crash is a state-machine defect rather than a resource-exhaustion condition. Monitor https://www.vulncheck.com/advisories/libexpat-through-2.11.0-null-pointer-dereference-via-entity-cdata-suspension and the vendor advisory for a confirmed fixed release identifier.

Affected VersionsENISA

libexpat 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

Expat is a stream-oriented C XML parser used pervasively as an embedded library (libexpat is shipped in Python's pyexpat, in many HTTP/SOAP stacks and in countless C/C++ applications). Its parser is a state machine: doContent() dispatches on markup, and when the library must return control to the caller, the parser is suspended and a processor function pointer plus an OPEN_INTERNAL_ENTITY stack records where parsing should resume. The root cause class is CWE-476 (NULL pointer dereference): the code path at lib/xmlparse.c around lines 4203-4208 mishandles the case where parsing is suspended inside a CDATA section that is itself being expanded from an internal general entity, so on resume the wrong processor is selected / parser state is inconsistent and a NULL dereference occurs during entity processing. The upstream fix (PR 1545) adds a boolean insideCdata field to the OPEN_INTERNAL_ENTITY structure in expat/lib/entities.h, sets it when doContent() is suspended without a next pointer while an internal entity is open, routes the resume through internalEntityProcessor into doCdataSection(), and clears the flag once the CDATA end is reached; accompanying regression tests cover both well-formed (two CDATA sections with suspended character data) and malformed (unclosed CDATA, expecting XML_ERROR_UNCLOSED_CDATA_SECTION) documents. Affected CPE is the generic library lineage cpe:2.3:a:libexpat:libexpat:* (all versions through 2.11.0); because the flaw lives in the library API contract rather than in any wire-format parsing default, exposure is determined by how the consuming application drives XML_StopParser/XML_ResumeParser. The reported CVSS 4.0 vector (AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N) and the independent CVSS 3.1 assessment (AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H) agree that this is availability-only and requires a specific, attacker-influenced but application-dependent suspension state; neither vector indicates confidentiality or integrity impact.

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

Remote unauthenticated input (AV:N/PR:N/UI:N) but requires the app to suspend parsing inside entity-CDATA (AC:H); impact is a crash only, so C:N/I:N/A:H.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
4.0 AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/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
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

libexpat through 2.11.0 contains a NULL pointer dereference vulnerability in doContent() in lib/xmlparse.c that mishandles parser suspension inside CDATA sections within internal general entities. Attackers can supply a crafted XML document to applications whose handlers suspend the parser inside the CDATA section, corrupting parser state and causing a crash.

Executive ViewAI

Why It Matters

A high-severity denial-of-service vulnerability in libexpat (up to 2.11.0) affects only applications that actively suspend XML parsing while inside a CDATA section within an internal entity. While exploitation requires a non-default integration pattern, a successful attack can crash critical services, causing operational disruption and potential financial impact. Leadership should prioritize patching any affected systems, especially customer-facing or high-availability services.

Business Impact: Medium
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

Prevalence
Ubiquitous
core XML parser embedded across OSes, languages, and countless applications
Social Media
3
Sightings
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 HIGH
CISA KEV No
Public POC No
EPSS N/A
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· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact
Medium

Priority Score

41
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +41
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

A null pointer dereference occurs when a program attempts to access memory through a pointer that has been set to NULL (address 0x0).

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

Related Vulnerabilities in libexpat Parser NULL Deref and DoS Flaws

View all 2
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