Critical Memory Corruption Vulnerability in libxml2: CVE-2025-49796

libxml2 Updated 03 Oct 2025

Summary

16/06/2025
N/A
Yes i
Critical
9.1

UBUNTU-CVE-2025-49796: A vulnerability was found in libxml2. Affects libxml2 versions < 2.9.1+dfsg1-3ubuntu4.13+esm8. Fixed in 2.9.1+dfsg1-3ubuntu4.13+esm8. 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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

libxml2 is a widely used XML parsing library that provides a range of functionalities for processing XML documents. It is known for its performance and compliance with XML standards, making it a critical component in many applications that require XML parsing. However, a vulnerability has been identified that can lead to memory corruption when processing specific XML elements, potentially compromising the stability and security of applications relying on this library.

Vulnerability Detail

A vulnerability was found in libxml2 that affects how certain sch:name elements are processed in input XML files. This flaw can trigger memory corruption, allowing an attacker to craft a malicious XML input file that may lead libxml2 to crash. The ramifications include denial of service and the risk of undefined behavior due to sensitive data being corrupted in memory. The CVSS score for this vulnerability is 9.1, indicating a critical severity level.

How To Fix

Minimum fixed version

2.9.1+dfsg1-3ubuntu4.13+esm8

This is the first release that contains the fix.

sudo apt-get install --only-upgrade libxml2

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

Workaround

As a temporary workaround, avoid processing untrusted XML files or implement strict validation of XML inputs to mitigate the risk of triggering the vulnerability until the package can be updated.

Conclusion

The vulnerability CVE-2025-49796 in libxml2 poses a significant risk due to its potential for memory corruption and denial of service. It is crucial for users and developers to update to the patched version of the library and to implement best practices in XML file handling to mitigate risks.

See every vulnerability recorded for libxml2 →

Share this vulnerability

FAQ

CVE-2025-49796 is a critical vulnerability in libxml2 that can lead to memory corruption when processing specific XML elements.

You can use Vulert to monitor and alert for open-source vulnerabilities in your software. Visit Vulert Scanner to check if your application is affected by this vulnerability.

The vulnerability can lead to denial of service and undefined behavior, potentially compromising sensitive data and application stability.

Yes, a patched version of libxml2 is available. Updating to the latest version will resolve the vulnerability.

If immediate updates are not possible, avoid processing untrusted XML files and implement strict validation of XML inputs as a temporary measure.

Related vulnerabilities

Recent vulnerabilities recorded for libxml2.

How To Fix

Minimum fixed version

2.9.1+dfsg1-3ubuntu4.13+esm8

This is the first release that contains the fix.

sudo apt-get install --only-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