Remote XML Entity Inclusion Vulnerability in libxml2

libxml2 Updated 02 Oct 2025

Summary

19/02/2018
N/A
Yes i
Critical
9.8

CVE-2017-7375: A flaw in libxml2 allows remote XML entity inclusion with default parser flags (i.e., when the caller did not request entity substitution, DTD validation, external DTD subset loading, or default DTD attributes). Affects libxml2 across 4 version ranges.

< 2.9.4+dfsg1-3.1 < 8effcb578e0590cc01bbcab0f9dccefc6bdbcdbd < a1dca81df7c352cd9a14ab678750b1623f8f8ed7 < bdec2183f34b37ee89ae1d330c6ad2bb4d76605f

Fixed in 2.9.4+dfsg1-3.1. 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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

libxml2 is a widely used XML parsing library that provides a range of functionalities for processing XML documents. It is known for its efficiency and is utilized in various applications and systems for XML manipulation. However, a flaw in its default parser settings can lead to serious security vulnerabilities, allowing unauthorized access to sensitive data.

Vulnerability Detail

CVE-2017-7375 is a vulnerability in libxml2 that allows remote XML entity inclusion when the default parser flags are used. This occurs when the caller does not explicitly request entity substitution, DTD validation, or external DTD subset loading. As a result, attackers may exploit this flaw to access local files or data from HTTP or FTP servers that would otherwise be protected. The vulnerability exposes a higher-risk attack surface that is typically not reachable under normal circumstances, potentially leading to data breaches or unauthorized information disclosure.

How To Fix

Minimum fixed version

2.9.4+dfsg1-3.1

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, you can disable the use of external entities in your XML parsing configuration. This can be done by setting the appropriate parser options in your application code. For example, in C, you can use:

xmlParserCtxtPtr ctxt = xmlNewParserCtxt();

xmlCtxtSetParserFlags(ctxt, XML_PARSE_NOENT | XML_PARSE_DTDLOAD);

Conclusion

CVE-2017-7375 presents a significant security risk for applications using libxml2 due to its potential for unauthorized data access. It is crucial to update to the latest version of the library and implement recommended security practices to mitigate this vulnerability.

See every vulnerability recorded for libxml2 →

Share this vulnerability

FAQ

CVE-2017-7375 is a vulnerability in the libxml2 library that allows remote XML entity inclusion due to improper parser settings.

Attackers can exploit this vulnerability to access sensitive data from local files or external servers by manipulating XML documents.

The consequences may include unauthorized data access, data breaches, and exposure of sensitive information.

You can use Vulert's playground to check if your application is affected by this vulnerability without any signup.

The CVSS score for CVE-2017-7375 is 9.8, indicating a critical level of severity.

Related vulnerabilities

Recent vulnerabilities recorded for libxml2.

How To Fix

Minimum fixed version

2.9.4+dfsg1-3.1

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