CVE-2026-134703 in Libexpatinfo

Summary

by MITRE • 11/22/2026

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.

Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.

Analysis

by VulDB Data Team • 11/22/2026

The vulnerability identified within libexpat versions up to 2.10.0 represents a critical flaw in the Unicode handling logic, specifically residing in the DEFINE_UTF16_TO_UTF16 conversion functions located in the xmltok.c source file. This issue manifests when the library is compiled with XML_UNICODE support and processes input data that utilizes non-native byte order for UTF-16 encoding. The core technical failure involves an improper boundary check during character processing, which allows valid surrogate pairs to be incorrectly split when there is limited output space available in the buffer. In standard Unicode theory, certain characters are represented using a pair of 16-bit code units known as high and low surrogates. These must always remain adjacent to correctly represent a single abstract character; if they are separated or processed individually, the resulting data becomes corrupted or malformed.

When an attacker supplies crafted XML documents containing lone high surrogates without their corresponding low surrogate counterparts, libexpat fails to validate this incomplete sequence properly under specific memory constraints. Instead of rejecting the invalid input or handling it safely, the parser proceeds with processing these isolated units. This leads to a situation where character data and default handlers receive malformed Unicode sequences that do not conform to valid UTF-16 standards. The operational impact of this flaw is significant for applications relying on libexpat for XML parsing, as it can lead to unexpected behavior, potential crashes due to invalid memory access or assertion failures, and the propagation of corrupted data through downstream systems. In security-sensitive contexts, such malformed input handling could potentially be leveraged in conjunction with other vulnerabilities to achieve arbitrary code execution or denial of service conditions by exploiting how subsequent parsers or applications interpret these broken surrogate sequences.

From a classification perspective, this vulnerability aligns closely with CWE-176 Improper Handling of Unicode Encoding Variations and CWE-20 Incorrect Processing of Input, as the root cause lies in the failure to correctly validate and process complex multi-byte character encodings according to established standards. Furthermore, the exploitation technique relates to ATT&CK Tactic TA0004 Impact, specifically through potential Denial of Service or data corruption scenarios, although it may also serve as a precursor for more sophisticated attacks if combined with memory corruption flaws in consuming applications. The vulnerability underscores the complexity and fragility inherent in implementing robust Unicode handling within C-based libraries where manual buffer management is required.

To mitigate this risk, organizations utilizing libexpat must immediately upgrade to version 2.10.1 or later, which contains patches addressing these specific boundary checks in the UTF-16 conversion routines. For environments where upgrading is not immediately feasible, implementing strict input validation at the application layer before passing XML data to the parser can provide a secondary defense mechanism. This includes ensuring that all incoming documents adhere strictly to valid Unicode standards and rejecting any content containing incomplete surrogate pairs or non-native byte order sequences unless explicitly required by business logic with appropriate sanitization measures in place. Regular security audits of XML parsing implementations are also recommended to identify similar edge cases in character encoding handling across the software supply chain.

Responsible

VulnCheck

Reservation

11/22/2026

Disclosure

11/22/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

very low

Sources

Want to know what is going to be exploited?

We predict KEV entries!