Buffer Over-read Vulnerability in libxml2

libxml2 Updated 02 Oct 2025

Summary

14/05/2024
N/A
Yes i
Unrated
Not published

CVE-2024-34459: An issue was discovered in xmllint (from libxml2) before 2.11.8 and 2.12.x before 2.12.7. Affects libxml2 across 2 version ranges.

< 2.11.8-r0 < 58a973c40ba927e5ad941789723da7c47a2d60e3

Fixed in 2.11.8-r0. 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 open-source library for parsing and manipulating XML files. It provides various functionalities for handling XML data, including parsing, validation, and XPath querying. The library is commonly used in applications and frameworks that deal with XML data, such as web browsers, document editors, and content management systems. However, a vulnerability has been discovered in libxml2 that can lead to a buffer over-read when formatting error messages with the xmllint utility's --htmlout option.

Vulnerability Detail

The buffer over-read vulnerability in libxml2 affects versions before 2.11.8 and 2.12.x before 2.12.7. When using xmllint with the --htmlout option to format error messages, a formatting error can occur in the xmlHTMLPrintFileContext function in xmllint.c. This error can result in the program reading beyond the bounds of a buffer, potentially exposing sensitive information or causing a crash. An attacker could exploit this vulnerability by crafting a malicious XML file and tricking a user or application into processing it with xmllint.

How To Fix

Minimum fixed version

2.11.8-r0

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

There is no known workaround for this vulnerability. It is recommended to apply the official fix by updating libxml2 to a patched version.

Conclusion

The buffer over-read vulnerability in libxml2 can potentially expose sensitive information or cause a crash when formatting error messages with xmllint's --htmlout option. It is crucial to update libxml2 to a patched version to mitigate this vulnerability. For further assistance and support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for libxml2 →

Share this vulnerability

FAQ

libxml2 is an open-source library for parsing and manipulating XML files. It is widely used in various applications and frameworks that deal with XML data.

xmllint is a command-line utility provided by libxml2 for parsing and validating XML files. It is commonly used for debugging and testing XML-related functionalities.

A buffer over-read vulnerability occurs when a program reads data from a buffer beyond its intended boundaries. This can lead to the exposure of sensitive information or cause the program to crash.

An attacker can exploit this vulnerability by crafting a malicious XML file and tricking a user or application into processing it with xmllint. This can lead to the exposure of sensitive information or a denial-of-service condition.

No, there is no known workaround for this vulnerability. It is recommended to apply the official fix by updating libxml2 to a patched version.

Related vulnerabilities

Recent vulnerabilities recorded for libxml2.

How To Fix

Minimum fixed version

2.11.8-r0

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