Memory Leak Vulnerability in libxml2: CVE-2019-19956

libxml2 Updated 02 Oct 2025

Summary

24/12/2019
N/A
Yes i
High
7.5

ALPINE-CVE-2019-19956: xmlParseBalancedChunkMemoryRecover in parser.c in libxml2 before 2.9.10 has a memory leak related to newDoc->oldNs. Affects libxml2 versions < 2.9.9-r3. Fixed in 2.9.9-r3. 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 Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

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, certain versions of libxml2 are vulnerable to a memory leak issue, which can lead to increased memory consumption and potential application instability.

Vulnerability Detail

The vulnerability identified as CVE-2019-19956 arises from the function xmlParseBalancedChunkMemoryRecover in parser.c within libxml2 versions prior to 2.9.10. This function has a memory leak associated with the newDoc->oldNs variable, which can lead to excessive memory usage over time. If exploited, this vulnerability could result in degraded application performance or crashes due to memory exhaustion.

How To Fix

Minimum fixed version

2.9.9-r3

This is the first release that contains the fix.

sudo apk add --upgrade libxml2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If immediate patching is not possible, consider limiting the usage of libxml2 in your application or monitoring memory usage closely to mitigate the impact of the memory leak until a proper fix can be applied.

Conclusion

CVE-2019-19956 is a significant vulnerability in libxml2 that can lead to memory leaks and application instability. It is crucial to update to the patched versions as soon as possible to mitigate the risks associated with this vulnerability.

See every vulnerability recorded for libxml2 →

Share this vulnerability

FAQ

CVE-2019-19956 is a memory leak vulnerability in the libxml2 library that can lead to increased memory consumption.

Versions of libxml2 prior to 2.9.10 are affected, with specific fixes available for different Alpine Linux versions.

The memory leak can lead to application instability, crashes, or performance degradation due to excessive memory usage.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time using just a manifest file. Visit Vulert Scanner to check your application without signup.

The CVSS score for CVE-2019-19956 is 7.5, indicating a high severity level.

Related vulnerabilities

Recent vulnerabilities recorded for libxml2.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Minimum fixed version

2.9.9-r3

This is the first release that contains the fix.

sudo apk add --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