Memory Leak Vulnerability in libxml2: CVE-2019-20388

libxml2 Updated 03 Oct 2025

Summary

21/01/2020
N/A
Yes i
High
7.5

UBUNTU-CVE-2019-20388: xmlSchemaPreRun in xmlschemas.c in libxml2 2.9.10 allows an xmlSchemaValidateStream memory leak. 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 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 and HTML documents. It is known for its performance and compliance with standards. However, vulnerabilities in libxml2 can lead to significant security risks, including memory leaks that may affect application stability and performance.

Vulnerability Detail

The vulnerability identified as CVE-2019-20388 is a memory leak in the xmlSchemaPreRun function within xmlschemas.c of libxml2 version 2.9.10. This flaw allows an attacker to exploit the library when validating XML schemas, potentially leading to excessive memory consumption. If left unaddressed, this could result in denial of service or degradation of application performance, particularly in environments that rely heavily on XML processing.

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 measure, if updating is not feasible, consider limiting the use of XML schema validation in your application until the patch can be applied. This can help mitigate the risk of memory leaks while maintaining application functionality.

Conclusion

The CVE-2019-20388 vulnerability in libxml2 poses a significant risk due to its potential for causing memory leaks during XML schema validation. It is crucial to update to the patched versions of the library to mitigate these risks. Users should also consider temporary workarounds if immediate updates are not possible.

See every vulnerability recorded for libxml2 →

Share this vulnerability

FAQ

CVE-2019-20388 is a vulnerability in libxml2 that causes a memory leak during XML schema validation.

Exploiting this vulnerability can lead to increased memory usage, potentially causing application crashes or slowdowns.

Yes, patches are available for various versions of libxml2. Updating to the latest version is recommended.

Consider disabling XML schema validation as a temporary workaround until you can apply the patch.

You can use Vulert, which monitors open-source vulnerabilities in your software using a manifest file like package-lock.json. Check your application for vulnerabilities without any signup at Vulert Playground.

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