CVE-2023-39615: libxml2 - Crafted XML Can Cause Global Buffer Overflow

libxml2 Updated 02 Oct 2025

Summary

29/08/2023
Yes i
Medium
6.5

CVE-2023-39615: Xmlsoft Libxml2 v2.11.0 was discovered to contain an out-of-bounds read via the xmlSAX2StartElement() function at /libxml2/SAX2.c. Affects libxml2 across 2 version ranges.

< 2.9.10+dfsg-6.7+deb11u6 < f296934ade688baab79caf1c62a82149ad78accf

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 software library for parsing and manipulating XML files. It provides a set of APIs and tools for developers to work with XML data. The vulnerability (CVE-2023-39615) affects libxml2 version 2.9.14+dfsg-1.3~deb12u1. This vulnerability allows attackers to cause a Denial of Service (DoS) by supplying a crafted XML file. The issue originates from an out-of-bounds read in the xmlSAX2StartElement() function in the SAX2.c file. It is important to note that the vendor does not support the legacy SAX1 interface with custom callbacks, and the vulnerability can be triggered even without crafted input.

Vulnerability Detail

The vulnerability (CVE-2023-39615) in libxml2 allows for a global buffer overflow when processing a specially crafted XML file. This can lead to a Denial of Service (DoS) condition, causing the application to crash. An attacker can exploit this vulnerability by providing a malicious XML file to the affected application. The out-of-bounds read occurs in the xmlSAX2StartElement() function, which is responsible for parsing XML elements. By manipulating certain elements in the XML file, an attacker can trigger the buffer overflow and potentially execute arbitrary code or crash the application. The severity of this vulnerability is rated as MEDIUM with a CVSS score of 6.5.

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

There is no specific workaround mentioned for this vulnerability. However, users can mitigate the risk by ensuring that they only process trusted XML files from trusted sources. Additionally, implementing proper input validation and sanitization techniques can help prevent the exploitation of this vulnerability.

Conclusion

The vulnerability (CVE-2023-39615) in libxml2 can be exploited by providing a specially crafted XML file, leading to a global buffer overflow and potential Denial of Service (DoS) or code execution. It is crucial to update libxml2 to the latest patched version to mitigate this vulnerability. Users should also exercise caution when processing XML files from untrusted sources. For further assistance and support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for libxml2 →

Share this vulnerability

FAQ

libxml2 is a software library for parsing and manipulating XML files. It provides APIs and tools for developers to work with XML data.

The vulnerability allows attackers to cause a Denial of Service (DoS) by supplying a crafted XML file. It can lead to application crashes and potential code execution.

To fix the vulnerability, update libxml2 to the latest patched version provided by your distribution. For Debian-based systems, use the package manager to update libxml2.

While no specific workaround is mentioned, users can mitigate the risk by processing only trusted XML files and implementing proper input validation.

The severity of this vulnerability is rated as MEDIUM with a CVSS score of 6.5.

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