Critical Use-After-Free Vulnerability in libxml2 Package

libxml2 Updated 02 Oct 2025

Summary

26/01/2025
N/A
Yes i
Unrated
Not published

DEBIAN-CVE-2022-49043: xmlXIncludeAddNode in xinclude.c in libxml2 before 2.11.0 has a use-after-free. Affects libxml2 versions < 2.9.10+dfsg-6.7+deb11u6. Fixed in 2.9.10+dfsg-6.7+deb11u6. 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 Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

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 standards, making it a crucial component in many applications. However, it has been identified to have a critical vulnerability that can lead to severe security risks if not addressed promptly.

Vulnerability Detail

The vulnerability identified as DEBIAN-CVE-2022-49043 affects libxml2 versions prior to 2.11.0. It is a use-after-free vulnerability located in the xmlXIncludeAddNode function within the xinclude.c file. This flaw can be exploited by attackers to execute arbitrary code or cause a denial of service, potentially compromising the integrity and availability of applications relying on this library.

How To Fix

Minimum fixed version

2.9.10+dfsg-6.7+deb11u6

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 measure, if updating the package is not immediately feasible, consider isolating the application that uses libxml2 from untrusted input to mitigate the risk of exploitation until a proper update can be applied.

Conclusion

The identified use-after-free vulnerability in the libxml2 package poses significant risks to applications that utilize this library. It is crucial to update to the latest patched versions to mitigate these risks and ensure the security of your software.

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 allowing attackers to manipulate the memory and execute arbitrary code.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.

Exploitation of this vulnerability can lead to arbitrary code execution, data corruption, or denial of service, which can severely impact the security and stability of applications.

Yes, you should upgrade to the patched versions: 2.9.10+dfsg-6.7+deb11u6 for Debian 11, 2.9.14+dfsg-1.3~deb12u2 for Debian 12, and 2.12.7+dfsg+really2.9.14-0.4 for Debian 13 and 14.

Vulert is a service that monitors and alerts for open-source vulnerabilities in your software using a manifest file like package-lock.json. It helps you stay informed about potential security risks.

Related vulnerabilities

Recent vulnerabilities recorded for libxml2.

How To Fix

Minimum fixed version

2.9.10+dfsg-6.7+deb11u6

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