bitVakt

Kernel Kit / Infix / v26.10.0latest

CVE-2026-124317

6.3medium

expat2.8.4 · 2.7.2 · 2.7.0in 4 of 4 releases

Not yet analysed by NVD. Matched on the vendor's record; this may change when NVD has analysed it.

Reach expat · 8 builds in 4 of 4 releases

full reviewcross-check✓ a member decided

Description · NVD

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.

Published 2026-11-07NVD

CVSS 4.0Network · no privileges · no user interaction

How it is reached

Attack vector
Network
Attack complexity
High
Attack requirements
Present
Privileges required
None
User interaction
None

What it costs

Confidentiality
Low
Integrity
None
Availability
Low

What it costs other systems

Confidentiality
None
Integrity
None
Availability
None

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

References 4
Review Av26.10.0aarch64_minimalNot exposedFable 5.2 · medium confidence · 2026-11-19

The unfixed unknown_toUtf8() / unknown_toUtf16() code is compiled into the target libexpat 2.8.4, and no patch is applied, so the build is affected at the source level.

The out-of-bounds read only happens when an application registers an unknown-encoding handler that supplies a multibyte convert callback. The only target-side code that registers such a handler is Python's pyexpat / _elementtree, and it always sets info->convert = NULL with a single-byte map. Expat then never marks any byte as a multibyte lead, so the vulnerable uenc->convert(...) call cannot be reached.

The other expat users in the image (dbus-daemon config loader, avahi-daemon static services, dbus-glib, dbus-cxx) do not register an unknown-encoding handler at all. Reaching the bug would need a custom native program, installed outside the product's management interfaces, that calls XML_SetUnknownEncodingHandler with its own multibyte converter; nothing reachable from the network does this.

Evidence 10
  1. `unknown_toUtf8()` calls `uenc->convert(uenc->userData, *fromP)` with no check of the remaining bytes against `fromLim`; the code is unfixed.

    output/build/expat-2.8.4/lib/xmltok.c:1375

  2. `unknown_toUtf16()` has the same unchecked `uenc->convert` call.

    output/build/expat-2.8.4/lib/xmltok.c:1399

  3. `XmlInitUnknownEncoding()` only creates multibyte lead bytes (`utf8[i][0] = 0`, the trigger for the convert call) for map values -2 to -4, and rejects them when `convert` is NULL.

    output/build/expat-2.8.4/lib/xmltok.c:1431-1439

  4. The file is empty (0 bytes); `buildroot/package/expat/` holds only `Config.in`, `expat.hash` and `expat.mk`, and there is no `patches/expat` directory, so no fix is backported.

    output/build/expat-2.8.4/.applied_patches_list

  5. `BR2_PACKAGE_EXPAT=y`; it is selected by `BR2_PACKAGE_DBUS` (`output/.config:1225`), `BR2_PACKAGE_PYTHON3_PYEXPAT` (`output/.config:1461`) and the avahi daemon (`buildroot/package/avahi/Config.in:30`).

    output/.config:2488

  6. The target library is configured with `--without-xmlwf --without-examples --without-tests`, so `xmlwf` (which has its own multibyte converters) is not built for the target.

    output/build/expat-2.8.4/config.log:7

  7. Python is configured with `--with-expat=system`, so `pyexpat` links the system `libexpat` 2.8.4.

    output/build/python3-3.12.14/config.log:7

  8. `PyUnknownEncodingHandler` fills the map with code points or -1 only, and sets `info->convert = NULL`; it never declares multibyte sequences.

    output/build/python3-3.12.14/Modules/pyexpat.c:1422-1429

  9. `pyexpat` registers `PyUnknownEncodingHandler` on every parser; `Modules/_elementtree.c:3754-3756` registers the same default handler.

    output/build/python3-3.12.14/Modules/pyexpat.c:1481

  10. The dbus config loader uses expat, but a search of `output/build` for `SetUnknownEncodingHandler` finds no target-side caller other than Python's `pyexpat.c` and `_elementtree.c`; the same holds for `output/build/avahi-0.8/avahi-daemon/static-services.c`.

    output/build/dbus-1.14.10/bus/config-loader-expat.c

Version and patches

The CVE covers libexpat through 2.10.0, so 2.8.4 (released 2026-08-31 per output/build/expat-2.8.4/Changes:19) is in range. I could not fetch the upstream fix (PR 1492), so the fixed version is not confirmed; it is presumably a release after 2.10.0. No patches are applied: output/build/expat-2.8.4/.applied_patches_list is empty, and the source at lib/xmltok.c:1375 and :1399 has no bounds check before the convert call.

Recommendation

Document as not exposed in the default product; no urgent backport is needed.

Pick up the fix through the normal Buildroot expat bump once a release containing upstream PR 1492 is available.

Re-evaluate if a package is added that calls XML_SetUnknownEncodingHandler with a non-NULL convert callback, for example host-only users today such as Perl XML::Parser, or target xmlwf.

Open questions

output/target showed no libexpat* or pyexpat* files in my search, so the installed binaries were not confirmed; the conclusion rests on build configuration and sources.

The upstream PR and advisory were not available offline, so the exact fix hunk and fixed version are unverified.

Callers were searched only in output/build sources with common C, C++ and Python extensions. A prebuilt or binary-only component using a multibyte converter would not have been found.

One combined search command was denied by the sandbox; I reran its parts as separate read-only searches, and no check was skipped as a result.

Members of Kernel Kit decide. Sign in if you are one.