In libxml2 before 2.13.8 and 2.14.x before 2.14.2, out-of-bounds memory access can occur in the Python API (Python bindings) because of an incorrect return value. This occurs in xmlPythonFileRead and xmlPythonFileReadRaw because of a difference between bytes and characters.
This issue has been addressed in the following products: Red Hat Enterprise Linux 8 Via RHSA-2025:8958 https://access.redhat.com/errata/RHSA-2025:8958