CVE-2026-86142: libxml2 heap buffer overflow in xmlXPtrEvalXPtrPart

CVE-2026-86142 · Severity: medium · CVSS 6.9 · Published 2026-09-05

libxml2 is a widely-used C library for parsing and processing XML documents, used by applications across operating systems and web services. A heap buffer overflow vulnerability in the XPointer parsing code could allow an attacker to trigger memory corruption and potentially execute arbitrary code when processing specially crafted XML documents with malicious XPointer expressions.

Technologies: Xmlsoft Libxml2. Vendors: Xmlsoft.

Quick answers

Is CVE-2026-86142 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-86142 being exploited in the wild.
How severe is CVE-2026-86142?
Medium severity, with a CVSS score of 6.9, published 5 September 2026.
Which products and versions are affected?
GNOME libxml2 before 2.15.4.
Is there a fix for CVE-2026-86142?
A patch was published on 2026-09-05: Fix released in version 2.15.4 Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-86142 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-86142?
Check whether you run Xmlsoft Libxml2. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

The vulnerability is a heap-based buffer overflow in the xmlXPtrEvalXPtrPart function caused by integer overflow during xpointer length saturation. The root cause is an unchecked overflow in the xmlStrlen() call, where the result is incremented without validating that the length value has not wrapped. An attacker can craft a malicious XPointer expression in an XML document to trigger this condition; the attack requires the application to process the document and evaluate the XPointer, but no authentication or special privileges are needed. Successful exploitation allows heap memory corruption leading to potential code execution. The fix, released in version 2.15.4, adds overflow detection to check whether xmlStrlen() has overflowed before proceeding with the length increment.

Affected products

  • GNOME libxml2 before 2.15.4

Timeline

  • 2026-09-05: disclosed
  • 2026-09-05: patched: Fix released in version 2.15.4

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.