Out-of-Bounds Memory Access Vulnerability in libxml2: CVE-2025-32414

libxml2 Updated 02 Oct 2025

Summary

08/04/2025
N/A
Yes i
High
7.5

CVE-2025-32414: 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. Affects libxml2 across 3 version ranges.

< 2.11.8-r3 >= a372cbf5821302ebaf757235b29ba812df78204d, < 0e145ae4881c2a05ae00128a3bd90d76d4dadc4b < eb0a2f2b91566384f378d870ffcd69c0a24162cc

Fixed in 2.11.8-r3. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

libxml2 is a widely used XML parsing library that provides a range of functionalities for processing XML and HTML documents. It is known for its speed and efficiency, making it a popular choice in various applications and systems. However, certain versions of libxml2 are susceptible to a critical vulnerability that can lead to out-of-bounds memory access, particularly affecting its Python API bindings.

Vulnerability Detail

CVE-2025-32414 is a vulnerability that arises from an incorrect return value in the Python API of libxml2, specifically in the xmlPythonFileRead and xmlPythonFileReadRaw functions. This flaw can lead to out-of-bounds memory access, potentially allowing an attacker to exploit the vulnerability to execute arbitrary code or crash the application. The issue stems from a discrepancy between bytes and characters, which can result in unexpected behavior when processing XML files.

How To Fix

Minimum fixed version

2.11.8-r3

This is the first release that contains the fix.

sudo apk add --upgrade libxml2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, if upgrading is not immediately possible, you can limit the use of the Python API for libxml2 in your application until the patch is applied. Additionally, consider implementing input validation to ensure that XML files processed by your application do not contain malicious content.

Conclusion

CVE-2025-32414 represents a significant vulnerability in libxml2 that can lead to severe security implications if not addressed. Users are strongly encouraged to update to the latest patched versions to mitigate risks. For those unable to update immediately, implementing workarounds can help reduce exposure until a fix is applied.

See every vulnerability recorded for libxml2 →

Share this vulnerability

FAQ

CVE-2025-32414 is a vulnerability in libxml2 that allows for out-of-bounds memory access due to incorrect return values in its Python API.

libxml2 versions before 2.13.8 and 2.14.x before 2.14.2 are affected by this vulnerability.

Exploitation of this vulnerability could lead to arbitrary code execution or application crashes, posing significant security risks.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

If an immediate update is not feasible, consider limiting the use of the Python API and implementing input validation as a temporary workaround.

Related vulnerabilities

Recent vulnerabilities recorded for libxml2.

How To Fix

Minimum fixed version

2.11.8-r3

This is the first release that contains the fix.

sudo apk add --upgrade libxml2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback