libexpat is the XML parser behind Python’s pyexpat, GNOME’s and KDE’s libraries, Apache’s mod_dav and a long tail of embedded software, and it can be built two ways: the usual byte-oriented library, libexpat.so.1, and an XML_UNICODE build, libexpatw.so.1, which hands the application UTF-16 instead of UTF-8. In the wide build, the DEFINE_UTF16_TO_UTF16 conversion functions in xmltok.c could split a valid surrogate pair when the output space ran out one code unit short, and a document in the non-native byte order could then deliver a lone high surrogate to the character-data and default handlers. The CVE record says attackers “can supply crafted documents that deliver lone high surrogates to character data and default handlers”. What an application does with half a character is the application’s problem, which is why the score is modest. Update libexpat to 2.11.0 or your distribution’s patched package; only software linked against the wide build is affected.
CVE-2026-134703 at a glance.
| Component | libexpat, the XML_UNICODE build only (libexpatw): the DEFINE_UTF16_TO_UTF16 decoders in expat/lib/xmltok.c, used when parsing UTF-16 input whose byte order differs from the host’s. The byte-oriented libexpat.so.1 that most Linux software links is not in the described path |
| Affected versions | libexpat through 2.10.0, per the VulnCheck CNA record; Ubuntu notes that the flaw “affects the XML_UNICODE libexpatw build shipped in libexpat1” |
| Fixed in | libexpat 2.11.0, released 23 November 2026, whose Changes file lists “#1519 CVE-2026-134703” among its security fixes. GitHub still showed pull request #1519 as open on 1 December with milestone 2.11.0, which looks like a stale view of a change that landed by another route; the release notes are the word. Ubuntu fixed 22.04, 24.04 and 26.04 by USN-9196-1 on 25 November; Debian forky/sid at 2.11.0; SUSE has 2.10.0-based updates in progress |
| Severity | VulnCheck (CNA) CVSS 4.0 6.3 Medium (AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N) and CVSS 3.1 3.7 Low (AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N), CWE-176 (improper handling of Unicode encoding). Ubuntu Medium; SUSE moderate at 3.7; Red Hat’s page refused automated readers; NVD Awaiting Analysis with both VulnCheck scores and no score of its own |
| Exploited in the wild | Not on CISA’s Known Exploited Vulnerabilities list as of 1 December 2026 (catalogue 2026.11.30). EPSS 0.00518 (37.4th percentile) on 30 November 2026 |
| Who is exposed | Software linked against libexpatw that parses UTF-16 XML from outside, in the byte order the host does not use (big-endian input on x86 and most ARM). On a Linux distribution that is a short list: Debian and Ubuntu ship libexpatw.so.1 in the same package as the byte build but few packages link it, and the Python, GNOME and Apache users all take the byte build. What the attacker gains is an unpaired surrogate in the application’s character data, which is invalid UTF-16; the integrity-low rating is the expectation that an application mishandles it rather than crashes |
| Published | CVE record 22 November 2026 (VulnCheck CNA); libexpat 2.11.0 released 23 November; this page built 1 December 2026, last updated 1 December 2026 |
What it is
UTF-16 encodes characters outside the Basic Multilingual Plane as a pair of 16-bit code units, a high surrogate followed by a low one, and the pair is only meaningful together. When libexpat’s wide build parses UTF-16 input in the opposite byte order from the host, it converts the input into native UTF-16 in chunks, filling an output buffer the application’s handler will see. The conversion stopped at the end of the output buffer, and when the buffer had room for exactly one more code unit while the next character needed two, it copied the high surrogate and stopped. The next chunk began with the low surrogate. The fix’s own commit title describes the problem as accessing the wrong “last two bytes” when checking for a trailing isolated high surrogate: the check that should have held the pair back looked at the wrong position.
The application-facing effect is that a character-data or default handler receives a string ending in a lone high surrogate, and the next call receives one beginning with a lone low surrogate. Both are malformed UTF-16, and what happens next depends on the handler: a conversion to UTF-8 may produce the three-byte encodings of surrogates that other parsers reject (the form sometimes called CESU-8), a length calculation may be off by one, a comparison may fail. None of that is memory corruption inside libexpat, which is why the CVSS 3.1 reading is 3.7 and the 4.0 reading 6.3 carries only a low integrity impact. The AC:H in both vectors is the byte-order and buffer-boundary alignment the attacker needs.
The fix in pull request #1519, by Sebastian Pipping, corrects the boundary check so a pair is never split, exposes the explicit-endianness decoders to the test suite and adds a stress test for the conversion. The 2.11.0 Changes file of 23 November 2026 lists it as a security fix alongside #1492 (CVE-2026-124317, an overread in the unknown-encoding decoder) and #1502 (CVE-2026-128241, symlink attacks by xmlwf -d). Ubuntu’s advisory cites an upstream commit, 0d6dacc, that differs from the 702389c in the pull request, which fits the picture of the change landing on the release branch under a different hash; the GitHub pages for both commits refused automated readers on 1 December, so the file list is taken from the pull request’s review thread, which is on expat/lib/xmltok.c.
Who is affected on Linux
Each row is what the distribution’s own security tracker said on 1 December 2026; the link in the row is the tracker page, which will be newer than this one. The byte build that nearly everything links is outside the described flaw; the rows describe the package, which carries both builds.
| Distribution | Status | Fixed package |
|---|---|---|
| Alpine | Not consulted for this page; the Alpine tracker has refused automated readers on every earlier run | — |
| Debian | expat vulnerable in bookworm (2.5.0-1+deb12u5) and trixie (2.9.0-1~deb13u1); fixed in forky (2.11.0-1) and sid (2.11.0-2); Debian bug 1154821; no DSA on 1 December | 2.11.0-1 (forky), 2.11.0-2 (sid); nothing yet for stable |
| Ubuntu | Priority Medium; fixed on 22.04, 24.04 and 26.04 by USN-9196-1 of 25 November 2026 (ten expat CVEs in one notice); 26.10 and the older releases Needs evaluation | 2.4.7-1ubuntu0.10 (jammy), 2.6.1-2ubuntu0.7 (noble), 2.7.4-1ubuntu0.3 (26.04) |
| RHEL, Rocky, Alma, CentOS Stream | Tracker unreachable on 1 December 2026 (client error on the hydra JSON); nothing inferred. Whether RHEL’s expat package includes the wide build is not established by this page | — |
| openSUSE/SLE | Rated moderate, CVSS 3.1 3.7; overall state Pending; SLES 15 SP7, SLES 16.0 and 16.1 and SLE Micro In progress; openSUSE Leap 16.0 and 16.1 Affected; SUSE Bugzilla 1291452 | expat >= 2.10.0-150700.3.21.1 (SP7 family) and >= 2.10.0-150400.3.45.1 (SP4–SP6 LTSS), both still in QA |
Static and vendored copies: Python’s bundled pyexpat, language runtimes, embedded firmware, container images built from source | The upstream release applies; each bundle is fixed when its own project rebuilds against a fixed libexpat | per bundle |
How to check
Three questions: which libexpat package is installed and is it at the fixed version; does anything on the host link the wide build, libexpatw.so.1, since the byte build is not in the described path; and does that something parse XML it did not write. The second question is the one that usually ends the exercise on a server.
# 1. which libexpat is installed, and which build variant: libexpat.so.1 is the byte build, libexpatw.so.1 the XML_UNICODE (wide) build
dpkg -l libexpat1 2>/dev/null | awk '/^ii/ {print $2, $3}'; rpm -q expat 2>/dev/null; apk info -v expat 2>/dev/null
ls -l /usr/lib/*/libexpat*.so.1* /usr/lib64/libexpat*.so.1* 2>/dev/null
strings $(ls /usr/lib/*/libexpat.so.1 /usr/lib64/libexpat.so.1 2>/dev/null | head -1) | grep -E '^expat_[0-9]' | head -1
# 2. who links the wide build? (on most servers: nothing)
for f in $(ls /usr/bin/* /usr/sbin/* /usr/lib/*/*.so* /usr/lib64/*.so* 2>/dev/null); do ldd "$f" 2>/dev/null | grep -q 'libexpatw\.so' && echo "$f"; done | head
# running processes with the wide library mapped
grep -l 'libexpatw\.so' /proc/[0-9]*/maps 2>/dev/null | cut -d/ -f3 | sort -un | xargs -r ps -o pid,comm -p
# 3. statically bundled copies that will not show in ldd (Python's pyexpat is the byte build and reports its version)
python3 -c 'import pyexpat; print("pyexpat bundled expat", pyexpat.version_info)' 2>/dev/null
python3 -c 'import pyexpat, sys; print(pyexpat.__file__)' 2>/dev/null | xargs -r ldd 2>/dev/null | grep expatA package at 2.11.0, or at the Ubuntu or SUSE build in the table, is fixed for both libraries. An older package where step 2 finds nothing linking libexpatw, and step 3 shows pyexpat on the system byte build, has no process in the described path; update at the normal cadence. A process that does map the wide library and parses external UTF-16 XML is the case to update now, and is more likely to be a Windows-origin application ported to Linux, since wide expat is the Windows default, than anything from the distribution.
How to fix it
Update the package and restart what links it. libexpat has no daemon of its own; the processes to restart are the ones that have the library mapped, and needrestart or the second command in the check lists them.
# Ubuntu 22.04 / 24.04 / 26.04 (USN-9196-1)
sudo apt update && sudo apt install --only-upgrade libexpat1 expat
# Debian forky / sid (2.11.0); bookworm and trixie have no fixed package yet
sudo apt update && sudo apt install --only-upgrade libexpat1
# openSUSE / SLE (when the 2.10.0-based update leaves QA)
sudo zypper refresh && sudo zypper update expat libexpat1
# from source, for bundles: 2.11.0 from https://github.com/libexpat/libexpat/releases
# then restart everything with the old library mapped
sudo needrestart -r a 2>/dev/null || grep -l 'libexpat.*(deleted)' /proc/[0-9]*/maps 2>/dev/null | cut -d/ -f3 | sort -unThere is no configuration switch for this one inside libexpat. The mitigation on an unfixed host is to stop feeding the wide build untrusted UTF-16: where the application is yours, decode the input to UTF-8 before parsing, which uses the byte decoders and sidesteps the surrogate split entirely:
# transcode untrusted UTF-16 XML to UTF-8 before it reaches a libexpatw-linked parser
iconv -f UTF-16 -t UTF-8 untrusted.xml > untrusted-utf8.xml
# and declare it, so the parser does not guess the encoding from the byte order mark
sed -i '1s/encoding="UTF-16"/encoding="UTF-8"/' untrusted-utf8.xmlDo not uninstall libexpat1 because only the wide build is affected: the package provides both libraries, and removing it takes Python’s XML modules, Apache, and most of the desktop with it. And do not read the GitHub pull request’s “Open” state as meaning the fix is unreleased; the 2.11.0 release notes list the CVE as fixed and Ubuntu has shipped the patch, which is the better evidence. If a later run finds the pull request merged under a different hash, the Sources entry will say so.
Sources
- CVE-2026-134703 at CVE.org — the VulnCheck CNA record (22 November 2026): the description, the through-2.10.0 range, the CVSS 4.0 and 3.1 vectors and CWE-176
- libexpat pull request #1519 — the fix: the “last two bytes” check, the decoder tests and the UTF-16 stress test; shown as Open with milestone 2.11.0 on 1 December, review thread on
xmltok.c - libexpat Changes at R_2_11_0 — “Release 2.11.0 Mon November 23 2026”, listing #1519 CVE-2026-134703 among the security fixes with #1492 and #1502
- Commit 702389c — the fix commit named in the record; the commit page was rate-limited by GitHub on 1 December, so its file list is not stated here
- NVD entry — Awaiting Analysis; published 22 November; VulnCheck’s 3.7 (3.1, primary) and 6.3 (4.0, secondary); CWE-176; no NVD score
- Distribution trackers: Debian (bug 1154821; forky/sid fixed at 2.11.0) · Ubuntu (Medium; USN-9196-1; upstream patch 0d6dacc; the libexpatw note) · USN-9196-1 (25 November 2026, ten CVEs) · Red Hat (unreachable on 1 December) · SUSE (moderate, 3.7, Pending; bug 1291452)
- CISA KEV catalogue 2026.11.30, not listed · EPSS: 0.00518, 37.4th percentile, on 30 November 2026
Related reading
- CVE-2026-137951: libexpat reads past a narrow string literal in a wide-character build with general entities off — the same November reporting round
- CVE-2026-139881: libexpat falls back to a predictable hash salt after a short read of /dev/urandom — a draft until its fix is confirmed; the same November reporting round
- CVE-2026-137992: libexpat duplicate ATTLIST declarations denial of service — the first of this round, also waiting on 2.12.0
- Locales and encoding — what UTF-16 surrogate pairs are and why half of one is not a character
- ldd — the tool the check uses to find who links the wide build
- Security advisories — every Linux-relevant CVE we track, newest first, with the component index
This advisory page was assembled from the primary sources listed above on 1 December 2026 and is updated when they change. The facts are theirs; the checks and the ordering are ours. If a row in the distribution table is out of date, the tracker link in that row is the current word.
