Skip to main content

libexpat EUVDEUVD-2026-119271

| CVE-2026-124317 MEDIUM
Buffer Over-read (CWE-126)
2026-11-07 VulnCheck GHSA-wm22-jw4m-rfcf
6.3
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 libexpat-based app
  2. Delivery
    Document declares application-registered unknown encoding
  3. Exploit
    Trailing truncated multibyte sequence
  4. Execution
    convert callback reads past parse buffer
  5. Impact
    Leak adjacent memory or crash process

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Buffer over-read prevention
Exploitation Conditions

Exploitation requires the application embedding libexpat to register a custom unknown encoding through XML_SetUnknownEncodingHandler with a convert callback, and the attacker-supplied XML document must end in a truncated multibyte sequence whose encoding-map byte length exceeds the bytes remaining before fromLim, causing unknown_toUtf8()/unknown_toUtf16() to advance the read pointer past the parse buffer. This is NOT default behavior: applications that do not install an unknown-encoding handler are not affected. Limiting factors: the non-default custom-encoding configuration, the crafted truncated-input requirement, and the AC:H/AT:P metrics indicating specific conditions must align; impact is confined to adjacent-memory disclosure or a crash (no code execution or integrity loss).

Impact

This is a moderate, conditionally-exploitable issue rather than a top-tier emergency. The CVSS 4.0 vector (AV:N/AC:H/AT:P/PR:N/UI:N) is network-reachable and needs no privileges or user interaction, but AC:H and AT:P signal that reliable triggering depends on specific, attacker-uncontrolled conditions - consistent with the description, which requires the embedding application to have registered a custom unknown-encoding convert callback. Impact is limited to VC:L/VA:L (adjacent-memory disclosure or crash), with no integrity impact, matching CWE-126 (buffer over-read). No KEV listing and no EPSS score were supplied, and there is no public exploit identified at time of analysis; the only exploitation signals are the vendor advisory (VulnCheck) and the fix. The vuln.today priority is 'this_month' (not act_now/emergency), aligning with a real-but-not-urgent patch priority. The principal caveat is reach: although libexpat itself is ubiquitous, the vulnerable path is only present when an application uses application-registered unknown encodings, which is uncommon - so real-world exposure is far narrower than libexpat's overall footprint.

Exploit ScenarioDerived

An attacker submits an XML document to a service that embeds libexpat (≤2.10.0) and has registered a custom unknown encoding via XML_SetUnknownEncodingHandler. By ending the document in a truncated multibyte sequence whose encoding-map length exceeds the remaining bytes, the convert callback in unknown_toUtf8()/unknown_toUtf16() advances past the parse buffer limit, reading adjacent memory that may be leaked in output or causing a crash. The CVSS AC:H/AT:P metrics indicate this requires the specific unknown-encoding configuration plus precisely crafted truncated input; no public exploit is identified at time of analysis.

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

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

Alert me

AnalysisAIv1 – Nov 07, 2026

libexpat through 2.10.0 can read past the end of the parse buffer in unknown_toUtf8() and unknown_toUtf16() when an embedding application has registered a custom unknown encoding via XML_SetUnknownEncodingHandler. If an attacker supplies an XML document that terminates in a truncated multibyte sequence, the encoding's convert callback advances the input pointer beyond fromLim, disclosing adjacent process memory or crashing the parser. The flaw is not reachable in the default configuration - only applications that install an unknown-encoding handler with a convert callback are exposed - and impact is limited to partial confidentiality loss and availability (assessed CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:L, CVSS 4.0 base 6.3); no confirmed active exploitation (not in CISA KEV) and no public exploit identified at time of analysis. Vendor remediation is available and the issue is prioritised for this month's patch cycle.

RemediationAI

Vendor-released patch status: available from vendor, delivered upstream as PR #1492 (https://github.com/libexpat/libexpat/pull/1492), which adds the missing readLen-versus-(fromLim - *fromP) check in both unknown_toUtf8() and unknown_toUtf16() and returns XML_CONVERT_INPUT_INCOMPLETE on truncation; the input data does not state a released version number containing the fix, so confirm the exact fixed release tag on the libexpat project page before pinning, and upgrade every embedded or statically linked copy - Expat is frequently bundled, so rebuilding dependent applications and language runtimes is part of the fix. Where upgrading cannot be completed immediately, the most direct compensating control is to stop registering an XML_SetUnknownEncodingHandler convert callback for parsers that process untrusted documents (or to restrict such parsers to built-in encodings); the trade-off is that applications legitimately parsing custom or legacy encodings lose that capability. Applications that must keep the handler should add their own length validation inside the convert callback so it never reads past the supplied end pointer, and should reject documents whose final bytes form an incomplete multibyte sequence; the trade-off is reliance on application code rather than the library boundary and the risk of diverging from Expat's own fix. Because the demonstrated impact is adjacent-memory disclosure or a crash rather than code execution, running parsers over untrusted input in a confined, least-privilege worker process with crash isolation limits both the leaked data and the availability effect, at the cost of process-management overhead. Advisory reference: https://www.vulncheck.com/advisories/libexpat-through-2.10.0-out-of-bounds-read-via-unknown-toutf8-and-unknown-toutf16.

Affected VersionsENISA

libexpat 0 ≤2.10.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 small, widely embedded C library for parsing XML, used directly by applications and indirectly by runtimes and language bindings. The affected routines live in expat/lib/xmltok.c (roughly lines 1274-1322 in the referenced revision) and implement the converter hooks for encodings that the application supplies at runtime through XML_SetUnknownEncodingHandler, rather than for Expat's built-in UTF-8/UTF-16/ISO-8859-1 tables. For such encodings the application fills an XML_Encoding.map array whose entries encode the byte length of multibyte sequences using BT_LEAD2/BT_LEAD3/BT_LEAD4 style markers; the old code advanced the source pointer by (type[**fromP] - (BT_LEAD2 - 2)) without ever comparing that computed length against the bytes remaining before fromLim. The weakness class is CWE-126 (buffer over-read): a length value derived from attacker-influenced input is used as a read span without a bounds check. PR #1492 fixes this by capturing the computed length in readLen and returning XML_CONVERT_INPUT_INCOMPLETE (the 'input truncated, more data needed' signal) whenever readLen exceeds (size_t)(fromLim - *fromP), and by normalising the function's tail to a single XML_CONVERT_COMPLETED return. The accompanying regression test (test_misc_unknown_encoding_no_source_overread) registers a synthetic 'x-q5' encoding mapping 0xC3 to a 2-byte lead and 0xA9 to a 4-byte lead, feeds the document "<?xml \xC3\xA9?>" as final input, and asserts that parsing returns XML_STATUS_ERROR instead of reading out of bounds. The trigger is only reachable when an application-installed handler defines such multibyte mapping entries; the underlying ordinary XML decoding paths are not implicated by the supplied evidence.

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

Network-reachable XML parsing (AV:N) but only when the app registers an unknown-encoding handler and a crafted truncated sequence is supplied, so AC:H; limited memory read and crash give C:L/A:L, I:N.

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 through 2.10.0 contains an out-of-bounds read vulnerability in unknown_toUtf8() and unknown_toUtf16() in xmltok.c when handling application-registered unknown encodings. Attackers can supply a document ending in a truncated multibyte sequence so the convert callback reads past the parse buffer, leaking adjacent memory or crashing applications.

Threat Intelligence Overview

EPSS Score
0.2%
Top 84% exploitable
Prevalence
Ubiquitous
libexpat is a core XML parser bundled across OSes, languages, and apps
Social Media
1
Sightings
Data Quality
6 sources
Confidence: High

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.2%
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
Medium

Priority Score

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

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