Skip to main content

libexpat CVE-2026-134703

| EUVDEUVD-2026-132580 MEDIUM
Improper Handling of Unicode Encoding (CWE-176)
2026-11-22 disclosure@vulncheck.com GHSA-38qh-9924-4393
6.3
CVSS 4.0 · Vendor: vulncheck
View

Attack ChainAIDerived

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

  1. Access
    Supply crafted non-native-endian UTF-16 XML
  2. Delivery
    Hit constrained output buffer during conversion
  3. Exploit
    Split valid surrogate pair
  4. Execution
    Deliver lone high surrogate to character/default handlers
  5. Impact
    Corrupt downstream Unicode processing

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Unicode normalization
Exploitation Conditions

Exploitation requires a specific stack of conditions: (1) libexpat must be compiled with XML_UNICODE so conversion targets UTF-16/wchar_t output; (2) the input must be UTF-16 in the NON-NATIVE byte order, routing through the DEFINE_UTF16_TO_UTF16 path; (3) available output space must be limited at a buffer boundary so the conversion splits a surrogate pair; and (4) the consuming application must register character data or default handlers and must mishandle a lone high surrogate downstream for any real effect. Limiting factors: the default XML_UNICODE build is uncommon versus standard UTF-8/char builds, native-endian UTF-16 is unaffected, there is no code-execution or confidentiality impact, and the AC:H/AT:P metrics reflect that the triggering buffer-boundary state is not fully attacker-controlled. These factors sharply narrow real-world exposure despite the network attack vector.

Impact

Signals point to a genuine but modest-priority issue rather than an urgent one. The supplied CVSS 4.0 vector (6.3, Medium) is AV:N but carries AC:H and AT:P, meaning network reachability is offset by specific, attacker-uncontrolled preconditions, and the only impact is VI:L (minor integrity of parser output) with VC:N and VA:N - no confidentiality loss, no code execution, no availability impact. KEV is not listed in the input (no confirmed active exploitation), no EPSS score was provided (exploitation probability unknown and cannot be inferred), and the references are the upstream fix commit, PR #1519, and a VulnCheck advisory - i.e., no public exploit identified at time of analysis. The vuln.today Decision label is this_month, consistent with patching in a normal maintenance cycle rather than emergency. Conflicts to note explicitly: the input Tag 'Information Disclosure' contradicts the CVSS impact profile (VC:N, VI:L), since this is an output-integrity/improper-Unicode-handling flaw (CWE-176), not disclosure. Net: real but low-to-moderate priority, dominated by the narrow affected configuration rather than broad exploitability.

Exploit ScenarioDerived

An attacker submits a crafted XML document encoded as UTF-16 in the non-native byte order to an application built with XML_UNICODE (wchar_t/UTF-16 output). When output buffer space is constrained, the DEFINE_UTF16_TO_UTF16 conversion splits a valid surrogate pair, passing a lone high surrogate into character data and default handlers, which can corrupt downstream Unicode processing. No public exploit is identified, and the AC:H/AT:P conditions mean the trigger depends on specific build mode, endianness, and buffer-boundary state rather than a trivially reproducible request.

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

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

Alert me

AnalysisAIv1 – Nov 22, 2026

XML_UNICODE builds of libexpat through 2.10.0 can emit isolated high surrogates into character-data and default handlers when an unauthenticated remote attacker supplies a crafted UTF-16 XML document in the non-native byte order and the conversion output buffer is nearly exhausted, splitting a valid surrogate pair. Impact is limited to integrity of the parsed character stream (C:N/I:L/A:N per the assessed vector); there is no code execution or confidentiality loss. Triggering requires a specific four-part stack of conditions (XML_UNICODE build, non-native byte order input, a buffer boundary, and a downstream handler that mishandles the lone surrogate), so real-world exposure is narrow; no public exploit was identified at time of analysis and CISA KEV status is not indicated.

RemediationAI

Upstream fix available (PR/commit); released patched version not independently confirmed - apply https://github.com/libexpat/libexpat/commit/702389c818cb402f2423fa998fa11907d621959f (tracked in https://github.com/libexpat/libexpat/pull/1519) and rebuild, since the change is in the compiled conversion macros rather than a data file, and confirm with the vendor advisory (https://www.vulncheck.com/advisories/libexpat-through-2.10.0-isolated-high-surrogate-via-utf-16-conversion) which tagged release first carries it. Where patching must wait, the effective compensating controls follow the four preconditions: (1) rebuild without XML_UNICODE and consume the standard UTF-8/char output - the affected macro is not compiled in, at the cost of losing wchar_t output and requiring the caller to transcode; (2) reject or pre-transcode UTF-16 documents received in non-native byte order at the application ingress, or normalize to native endianness or UTF-8 before parsing - this closes the DEFINE_UTF16_TO_UTF16 path but adds an ingress processing step and can break legitimate non-native-endian feeds; (3) validate character-data and default handler output for surrogate range violations (any code unit in 0xD800-0xDBFF not immediately followed by 0xDC00-0xDFFF) and drop the document - a downstream safety net only, and it leaves the malformed value observable to any handler that does not perform the check. The primary complete fix remains updating to a libexpat build that includes the referenced commit.

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

The flaw is an instance of CWE-176 (Improper Handling of Unicode Encoding) inside the DEFINE_UTF16_TO_UTF16 macro family in expat/lib/xmltok.c, the byte-order conversion layer used by libexpat's tokenizer. That macro is only compiled into the XML_UNICODE configuration, where the parser produces wchar_t/UTF-16 output rather than the usual UTF-8 char output; the standard UTF-8 build is unaffected. It is exercised specifically when the input document is UTF-16 in the byte order opposite to the host (non-native endianness), which forces an actual 16-to-16 byte swap rather than a passthrough. In the vulnerable code the converter trimmed the input range to an even byte count and then, if a high surrogate (0xD800-0xDBFF) landed in the final two bytes and the destination was full, returned XML_CONVERT_INPUT_INCOMPLETE - but the surrounding logic could still leave insufficient output space, allowing a surrogate pair split across the boundary so that a lone high surrogate reaches the character-data and default handlers. The upstream fix recomputes the maximum copyable byte count from the remaining output space, shrinks the input range to that even maximum, sets XML_CONVERT_OUTPUT_EXHAUSTED when space rather than input is the limiter, and guards the trailing-high-surrogate test with an explicit (fromLim - *fromP) >= 2 check so an output-exhaustion result is not overwritten by an input-incomplete result. Downstream, no sanitization of the surrogate range is performed by libexpat itself, so a consuming application that trusts handler output can propagate the malformed code point.

Know when the next one hits your stack

  • 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:N/VI:L/VA:N/SC:N/SI:N/SA:N
vuln.today AI 3.7 LOW

Network-reachable via crafted XML but needs XML_UNICODE build, non-native-endian UTF-16, and a constrained output buffer (AC:H); only output integrity is affected (I:L), with no confidentiality or availability impact.

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

DescriptionCVE.org

libexpat through 2.10.0 contains an improper Unicode handling vulnerability in DEFINE_UTF16_TO_UTF16 conversion functions in xmltok.c that can split valid surrogate pairs when output space is limited. In XML_UNICODE builds parsing non-native byte order UTF-16 input, attackers can supply crafted documents that deliver lone high surrogates to character data and default handlers.

Threat Intelligence Overview

EPSS Score
0.4%
Top 64% exploitable
Prevalence
Ubiquitous
Expat XML parser bundled across countless OS, language, and application stacks
Social Media
2
Sightings
Data Quality
7 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.4%
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
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

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

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

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