CVE-2016-9318
Medium · 5.5CVSS
5.5
EPSS
2.9%
Published
Nov 16, 2016
CISA due date
—
Cloudanix analysis
XML processing software can be tricked into leaking private files when it receives specially crafted documents, allowing unauthorized access to sensitive information on the system.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Data Exposure
- Component
- Library
- Class
- XXE
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
The library does not expose a flag to limit XML document processing to the current file only, allowing external entity references to resolve and read arbitrary local or remote resources during parsing.
Why it matters to the business
Organizations using affected XML libraries face risk of sensitive file disclosure when processing untrusted documents, increasing potential for data leakage in applications handling XML input.
How an attack unfolds
An attacker supplies a crafted XML document containing external entity declarations to an application linked against vulnerable libxml2. When the document is parsed without entity restrictions, the library resolves the entities, disclosing contents of local files or remote resources back to the attacker.
How to fix it
Upgrade libxml2 to a version supporting entity restriction flags and configure parsers to disable external entity resolution. Recompile or update dependent products such as XMLSec. Apply vendor patches for Canonical Ubuntu Linux packages when available.
How to confirm the fix worked
Inspect source code and build configurations for libxml2 XML parser options that explicitly disable external entities. Test with known XXE payloads to confirm resolution is blocked after upgrades.
Typical attack path
- Identify an application that parses attacker-controlled XML using libxml2
- Craft an XML document with malicious external entity references
- Deliver the document via file upload, network protocol, or local input
- Trigger parsing and observe exfiltrated file contents
How to detect it
Examine application logs for XML parsing events involving external entity references or unexpected file system reads. Correlate with process execution of applications using libxml2 when handling untrusted input.
What your security team should do
- Prioritize patching or upgrading libxml2 in all affected products given public exploit availability
- Enforce secure XML parsing defaults across the environment
- Review and restrict file system access for applications handling untrusted XML
- Monitor EPSS and exploit maturity trends for renewed urgency
The record
libxml2 2.9.4 and earlier, as used in XMLSec 1.2.23 and earlier and other products, does not offer a flag directly indicating that the current document may be read but other files may not be opened, which makes it easier for remote attackers to conduct XML External Entity (XXE) attacks via a crafted document.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Alpine:v3.10 | libxml2 | 0 | 2.9.4-r2 |
| Alpine:v3.11 | libxml2 | 0 | 2.9.4-r2 |
| Alpine:v3.12 | libxml2 | 0 | 2.9.4-r2 |
| Alpine:v3.13 | libxml2 | 0 | 2.9.4-r2 |
| Alpine:v3.14 | libxml2 | 0 | 2.9.4-r2 |
| Alpine:v3.15 | libxml2 | 0 | 2.9.4-r2 |
| Alpine:v3.16 | libxml2 | 0 | 2.9.4-r2 |
| Alpine:v3.17 | libxml2 | 0 | 2.9.4-r2 |
| Alpine:v3.18 | libxml2 | 0 | 2.9.4-r2 |
| Alpine:v3.19 | libxml2 | 0 | 2.9.4-r2 |
| Alpine:v3.2 | libxml2 | 0 | 2.9.4-r2 |
| Alpine:v3.20 | libxml2 | 0 | 2.9.4-r2 |
| Alpine:v3.21 | libxml2 | 0 | 2.9.4-r2 |
| Alpine:v3.22 | libxml2 | 0 | 2.9.4-r2 |
| Alpine:v3.3 | libxml2 | 0 | 2.9.4-r2 |
| Alpine:v3.4 | libxml2 | 0 | 2.9.4-r2 |
| Alpine:v3.5 | libxml2 | 0 | 2.9.4-r2 |
| Alpine:v3.6 | libxml2 | 0 | 2.9.4-r2 |
| Alpine:v3.7 | libxml2 | 0 | 2.9.4-r2 |
| Alpine:v3.8 | libxml2 | 0 | 2.9.4-r2 |
| Alpine:v3.9 | libxml2 | 0 | 2.9.4-r2 |
| Debian:11 | libxml2 | 0 | 2.9.10+dfsg-2 |
| Debian:12 | libxml2 | 0 | 2.9.10+dfsg-2 |
| Debian:13 | libxml2 | 0 | 2.9.10+dfsg-2 |
| Debian:14 | libxml2 | 0 | 2.9.10+dfsg-2 |
| Debian:9 | libxml2 | 0 | 2.9.4+dfsg1-2.2+deb9u6 |
| Mageia:5 | libxml2 | 0 | 2.9.7-1.mga5 |
| Mageia:5 | perl-XML-LibXML | 0 | 2.12.100-1.2.mga5 |
| SUSE:Linux Enterprise Desktop 12 SP1 | libxml2 | 0 | 2.9.1-26.12.1 |
| SUSE:Linux Enterprise Desktop 12 SP1 | python-libxml2 | 0 | 2.9.1-26.12.1 |
| SUSE:Linux Enterprise Desktop 12 SP2 | libxml2 | 0 | 2.9.4-33.1 |
| SUSE:Linux Enterprise Desktop 12 SP2 | python-libxml2 | 0 | 2.9.4-33.1 |
| SUSE:Linux Enterprise Desktop 12 SP4 | libxml2 | 0 | 2.9.4-46.20.1 |
| SUSE:Linux Enterprise Desktop 12 SP4 | python-libxml2 | 0 | 2.9.4-46.20.1 |
| SUSE:Linux Enterprise Point of Sale 11 SP3 | libxml2 | 0 | 2.7.6-0.69.1 |
| SUSE:Linux Enterprise Point of Sale 11 SP3 | libxml2 | 0 | 2.7.6-0.77.15.1 |
| SUSE:Linux Enterprise Point of Sale 11 SP3 | libxml2-python | 0 | 2.7.6-0.69.3 |
| SUSE:Linux Enterprise Point of Sale 11 SP3 | libxml2-python | 0 | 2.7.6-0.77.15.1 |
| SUSE:Linux Enterprise Server 11 SP3-LTSS | libxml2 | 0 | 2.7.6-0.69.1 |
| SUSE:Linux Enterprise Server 11 SP3-LTSS | libxml2-python | 0 | 2.7.6-0.69.3 |
| SUSE:Linux Enterprise Server 11 SP3-TERADATA | libxml2 | 0 | 2.7.6-0.69.1 |
| SUSE:Linux Enterprise Server 11 SP3-TERADATA | libxml2-python | 0 | 2.7.6-0.69.3 |
| SUSE:Linux Enterprise Server 11 SP4 | libxml2 | 0 | 2.7.6-0.64.1 |
| SUSE:Linux Enterprise Server 11 SP4 | libxml2 | 0 | 2.7.6-0.69.1 |
| SUSE:Linux Enterprise Server 11 SP4 | libxml2 | 0 | 2.7.6-0.77.15.1 |
| SUSE:Linux Enterprise Server 11 SP4 | libxml2-python | 0 | 2.7.6-0.64.4 |
| SUSE:Linux Enterprise Server 11 SP4 | libxml2-python | 0 | 2.7.6-0.69.3 |
| SUSE:Linux Enterprise Server 11 SP4 | libxml2-python | 0 | 2.7.6-0.77.15.1 |
| SUSE:Linux Enterprise Server 12 SP1 | libxml2 | 0 | 2.9.1-26.12.1 |
| SUSE:Linux Enterprise Server 12 SP1 | python-libxml2 | 0 | 2.9.1-26.12.1 |
| SUSE:Linux Enterprise Server 12 SP2 | libxml2 | 0 | 2.9.4-33.1 |
| SUSE:Linux Enterprise Server 12 SP2 | python-libxml2 | 0 | 2.9.4-33.1 |
| SUSE:Linux Enterprise Server 12 SP4 | libxml2 | 0 | 2.9.4-46.20.1 |
| SUSE:Linux Enterprise Server 12 SP4 | python-libxml2 | 0 | 2.9.4-46.20.1 |
| SUSE:Linux Enterprise Server for Raspberry Pi 12 SP2 | libxml2 | 0 | 2.9.4-33.1 |
| SUSE:Linux Enterprise Server for Raspberry Pi 12 SP2 | python-libxml2 | 0 | 2.9.4-33.1 |
| SUSE:Linux Enterprise Server for SAP Applications 11 SP4 | libxml2 | 0 | 2.7.6-0.64.1 |
| SUSE:Linux Enterprise Server for SAP Applications 11 SP4 | libxml2 | 0 | 2.7.6-0.69.1 |
| SUSE:Linux Enterprise Server for SAP Applications 11 SP4 | libxml2 | 0 | 2.7.6-0.77.15.1 |
| SUSE:Linux Enterprise Server for SAP Applications 11 SP4 | libxml2-python | 0 | 2.7.6-0.64.4 |
| SUSE:Linux Enterprise Server for SAP Applications 11 SP4 | libxml2-python | 0 | 2.7.6-0.69.3 |
| SUSE:Linux Enterprise Server for SAP Applications 11 SP4 | libxml2-python | 0 | 2.7.6-0.77.15.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP1 | libxml2 | 0 | 2.9.1-26.12.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP1 | python-libxml2 | 0 | 2.9.1-26.12.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP2 | libxml2 | 0 | 2.9.4-33.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP2 | python-libxml2 | 0 | 2.9.4-33.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP4 | libxml2 | 0 | 2.9.4-46.20.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP4 | python-libxml2 | 0 | 2.9.4-46.20.1 |
| SUSE:Linux Enterprise Software Development Kit 11 SP4 | libxml2 | 0 | 2.7.6-0.64.1 |
| SUSE:Linux Enterprise Software Development Kit 11 SP4 | libxml2 | 0 | 2.7.6-0.69.1 |
| SUSE:Linux Enterprise Software Development Kit 11 SP4 | libxml2 | 0 | 2.7.6-0.77.15.1 |
| SUSE:Linux Enterprise Software Development Kit 12 SP1 | libxml2 | 0 | 2.9.1-26.12.1 |
| SUSE:Linux Enterprise Software Development Kit 12 SP2 | libxml2 | 0 | 2.9.4-33.1 |
| SUSE:Linux Enterprise Software Development Kit 12 SP4 | libxml2 | 0 | 2.9.4-46.20.1 |
| Ubuntu:14.04:LTS | libxml2 | 0 | 2.9.1+dfsg1-3ubuntu4.13 |
| Ubuntu:16.04:LTS | libxml2 | 0 | 2.9.3+dfsg1-1ubuntu0.6 |
| Ubuntu:18.04:LTS | libxml2 | 0 | 2.9.4+dfsg1-6.1ubuntu1.2 |
Related vulnerabilities
- CVE-2017-16932 parser.c in libxml2 before 2.9.5 does not prevent infinite recursion in parameter… Also affects libxml2
- CVE-2017-0663 A remote code execution vulnerability in libxml2 could enable an attacker using a… Also affects libxml2
- CVE-2017-8872 The htmlParseTryOrFinish function in HTMLparser.c in libxml2 2.9.4 allows attackers to… Also affects libxml2
- CVE-2016-4448 Format string vulnerability in libxml2 before 2.9.4 allows attackers to have unspecified… Also affects libxml2
- CVE-2016-4447 The xmlParseElementDecl function in parser.c in libxml2 before 2.9.4 allows… Also affects libxml2
- CVE-2015-8806 dict.c in libxml2 allows remote attackers to cause a denial of service (heap-based buffer… Also affects libxml2
- CVE-2015-7499 Heap-based buffer overflow in the xmlGROW function in parser.c in libxml2 before 2.9.3… Also affects libxml2
- CVE-2015-5312 The xmlStringLenDecodeEntities function in parser.c in libxml2 before 2.9.3 does not… Also affects libxml2