Critical Security Vulnerability in libxml2: Use-After-Free and Buffer Overflow Issues

libxml2 Updated 02 Oct 2025

Summary

29/07/2025
N/A
Yes i
High
8.1

RLSA-2025:2679: Important: libxml2 security update. Affects libxml2 versions < 0:2.9.13-6.el9_5.2. Fixed in 0:2.9.13-6.el9_5.2. 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 Your last release was probably never penetration tested 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 development library that provides tools for parsing and manipulating XML documents. It supports various XML standards and is integral to many applications that require XML processing. The library is known for its performance and flexibility, making it a popular choice among developers. However, recent vulnerabilities have been identified that could compromise the security of applications relying on this library.

Vulnerability Detail

The vulnerabilities in libxml2 include a Use-After-Free issue (CVE-2024-56171) and a stack-based buffer overflow in the xmlSnprintfElements function (CVE-2025-24928). The Use-After-Free vulnerability can allow an attacker to exploit memory that has already been freed, potentially leading to arbitrary code execution. The buffer overflow can result in memory corruption, which may also allow attackers to execute arbitrary code or crash the application. Both vulnerabilities pose significant risks to the integrity and confidentiality of data processed by applications using libxml2.

How To Fix

Minimum fixed version

0:2.9.13-6.el9_5.2

This is the first release that contains the fix.

sudo dnf update libxml2

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

Workaround

As a temporary workaround, you can limit the use of libxml2 in your applications until the update is applied. Review your code to ensure that it does not handle untrusted XML data, which could be exploited through these vulnerabilities.

Conclusion

The identified vulnerabilities in libxml2 are serious and require immediate attention. By updating to the latest patched version, users can mitigate the risks associated with these vulnerabilities. Utilizing tools like Vulert can help monitor and manage open-source vulnerabilities effectively.

See every vulnerability recorded for libxml2 →

Share this vulnerability

FAQ

CVE-2024-56171 is a security vulnerability in libxml2 that involves a Use-After-Free condition, which can lead to arbitrary code execution.

CVE-2025-24928 is a stack-based buffer overflow vulnerability in the xmlSnprintfElements function of libxml2, which can cause memory corruption.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. Visit Vulert Scanner to check your application without needing to sign up.

The vulnerabilities can lead to arbitrary code execution, data breaches, and application crashes, posing significant risks to the security of affected systems.

The vulnerabilities have a CVSS score of 8.1, indicating they are critical and should be addressed immediately to protect your systems.

Related vulnerabilities

Recent vulnerabilities recorded for libxml2.

How To Fix

Minimum fixed version

0:2.9.13-6.el9_5.2

This is the first release that contains the fix.

sudo dnf update 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