CVE Database›Document archive›CVE-2025-32414

CVE-2025-32414

libxml2: Out-of-Bounds Read in libxml2

Loading…

Severity

Moderate

Red Hat Product Security

5.6

CVSS 3.1

Review impact separately from score.

Published · April 8, 2025

Updated · October 13, 2026

Description

A flaw was found in libxml2. This vulnerability allows out-of-bounds memory access due to incorrect handling of return values in xmlPythonFileRead and xmlPythonFileReadRaw. This is caused by a mismatch between the length of the file in bytes vs the length in characters, as unicode characters can occupy up to 4 bytes per character.

Statement

This bug affects parsing of text streams using:

  • the Python bindings (pending deprecation: https://gitlab.gnome.org/GNOME/libxml2/-/issues/891)
  • the libxml2 SAX driver drv_libxml2,
  • the XML Reader API

Parsing of binary streams is not affected by this vulnerability.

The vulnerability exists in the libxml2 package the bug arises because of a mismatch between characters vs. bytes handling: functions xmlPythonFileRead and xmlPythonFileReadRaw may compute a length incorrectly (mistaking character count for byte count), but for a successful exploitation of this bug requires local access, on top of that the path to exploitation is non trivial, where handling of python binding's and specific input handling of bytes and characters are required which makes this outside the scope of an attacker and increases the attack complexity, for these reasons this has been marked as moderate by Red Hat.

CVSS score applicability

The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.

Mitigation

Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.

CVSS / CWE

CVSS 3.1 · 5.6
CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:L

CWE-393 · Return of Wrong Status Code