Use-After-Free Vulnerability in libxml2: Risk of Memory Allocation Failures

libxml2 Updated 02 Oct 2025

Summary

06/10/2023
N/A
Yes i
Unrated
Not published

DEBIAN-CVE-2023-45322: libxml2 through 2.11.5 has a use-after-free that can only occur after a certain memory allocation fails. 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 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 XML parsing library that provides a range of functionalities for processing XML and HTML documents. It is known for its performance and compliance with standards. However, like many libraries, it can be susceptible to vulnerabilities that arise from improper memory management. The specific issue at hand is a use-after-free vulnerability that can occur when memory allocation fails, potentially leading to application crashes or exploitation.

Vulnerability Detail

libxml2 through version 2.11.5 has a use-after-free vulnerability that occurs in the xmlUnlinkNode function within tree.c. This vulnerability arises when a memory allocation fails, allowing an attacker to exploit the situation. Although the vendor has stated that they do not consider this issue critical, the potential for an attacker to manipulate memory management could lead to severe consequences, including application instability or unauthorized access.

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

Currently, there are no specific workarounds mentioned for this vulnerability. It is recommended to apply the patch as soon as possible to mitigate any risks associated with this issue.

Conclusion

The use-after-free vulnerability in libxml2 presents a risk that, while not deemed critical by the vendor, should be addressed promptly through updates. Users of Debian systems should ensure they are running the patched versions of libxml2 to mitigate potential risks.

See every vulnerability recorded for libxml2 →

Share this vulnerability

FAQ

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

You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. Simply upload your manifest file like package-lock.json to check for vulnerabilities.

The vendor does not consider this vulnerability critical, but it can still pose risks if exploited, especially in applications that rely heavily on libxml2.

Exploitation of this vulnerability could lead to application crashes, unauthorized access, or other unpredictable behaviors.

It is recommended to regularly update your packages and monitor for vulnerabilities to ensure your software remains secure.

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