Use-After-Free Vulnerability in libxml2: Risk of Crashes and Undefined Behavior

libxml2 Updated 02 Oct 2025

Summary

16/06/2025
N/A
Yes i
Unrated
Not published

DEBIAN-CVE-2025-49794: A use-after-free vulnerability was found in libxml2. Affects libxml2 versions < 2.9.10+dfsg-6.7+deb11u8. Fixed in 2.9.10+dfsg-6.7+deb11u8. 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 XML parsing library that provides a range of functionalities for processing XML documents. It is integral to many applications that require XML manipulation, offering features such as validation, XPath support, and document traversal. However, it is susceptible to certain vulnerabilities, including a recently identified use-after-free issue that can lead to crashes or unpredictable behavior when processing specific XML structures.

Vulnerability Detail

A use-after-free vulnerability was discovered in libxml2, which occurs during the parsing of XPath elements under specific conditions involving XML schematron schema elements. This flaw can be exploited by a malicious actor who crafts a specially designed XML document, potentially leading to application crashes or other undefined behaviors when the affected libxml2 library processes the input.

How To Fix

Minimum fixed version

2.9.10+dfsg-6.7+deb11u8

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, users should avoid processing untrusted XML documents that may contain XPath elements with <sch:name path="..."/> schema elements until the library is updated.

Conclusion

The identified use-after-free vulnerability in libxml2 poses significant risks to applications relying on this library for XML processing. It is crucial for users to update to the latest patched versions to mitigate these risks and ensure the stability and security of their applications.

See every vulnerability recorded for libxml2 →

Share this vulnerability

FAQ

A use-after-free vulnerability occurs when a program continues to use a memory reference after it has been freed, potentially leading to crashes or exploitation.

You can check if your application is affected by using the Vulert playground at Vulert Scanner, which allows you to monitor for open-source vulnerabilities without any signup.

The risks include application crashes and potential exploitation by attackers, leading to unauthorized access or data corruption.

Yes, avoid processing untrusted XML documents that may exploit this vulnerability until the library is updated.

More information about libxml2 can be found on its official website or documentation, which provides insights into its features and usage.

Related vulnerabilities

Recent vulnerabilities recorded for libxml2.

How To Fix

Minimum fixed version

2.9.10+dfsg-6.7+deb11u8

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