Global Buffer Over-read Vulnerability in libxml2: CVE-2020-24977

libxml2 Updated 03 Oct 2025

Summary

04/09/2020
N/A
Yes i
Medium
6.5

UBUNTU-CVE-2020-24977: GNOME project libxml2 v2.9.10 has a global buffer over-read vulnerability in xmlEncodeEntitiesInternal at libxml2/entities.c. Affects libxml2 versions < 2.9.1+dfsg1-3ubuntu4.13+esm2. Fixed in 2.9.1+dfsg1-3ubuntu4.13+esm2. 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 variety of functionalities for processing XML documents. It is essential for applications that require XML manipulation, including web browsers, document editors, and data interchange systems. The library is known for its performance and compliance with XML standards. However, it has been found to be vulnerable to a global buffer over-read, which can lead to potential data exposure.

Vulnerability Detail

The vulnerability identified as CVE-2020-24977 is a global buffer over-read in the xmlEncodeEntitiesInternal function located in libxml2/entities.c. This flaw allows an attacker to read beyond the allocated memory buffer, potentially exposing sensitive information. The issue arises from improper handling of input data, which can lead to unintended memory access. If exploited, this vulnerability could allow an attacker to gain access to confidential data, impacting the integrity and confidentiality of the affected systems.

How To Fix

Minimum fixed version

2.9.1+dfsg1-3ubuntu4.13+esm2

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 can limit the input data size to the xmlEncodeEntitiesInternal function to prevent the over-read condition. However, this is not a permanent solution and updating the package is strongly recommended.

Conclusion

CVE-2020-24977 is a significant vulnerability in the libxml2 library that can lead to global buffer over-reads, potentially exposing sensitive information. It is crucial for users to update their libxml2 installations to the latest patched versions to mitigate this risk. Utilizing tools like Vulert can help monitor and manage vulnerabilities effectively.

See every vulnerability recorded for libxml2 →

Share this vulnerability

FAQ

CVE-2020-24977 is a vulnerability in the libxml2 library that allows for a global buffer over-read, potentially exposing sensitive information.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. Visit Vulert Scanner to check if your application is affected without requiring any signup.

Exploitation of this vulnerability can lead to unauthorized access to sensitive data, compromising the security and privacy of affected systems.

Yes, a patched version of libxml2 is available. Users should update to at least version 2.9.10+dfsg-5ubuntu0.20.04.1 to mitigate the risk.

The CVSS score for CVE-2020-24977 is 6.5, indicating a medium severity level.

Related vulnerabilities

Recent vulnerabilities recorded for libxml2.

How To Fix

Minimum fixed version

2.9.1+dfsg1-3ubuntu4.13+esm2

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