CVE-2017-16932
High · 7.5CVSS
7.5
EPSS
6.5%
Published
Nov 23, 2017
CISA due date
—
Cloudanix analysis
A flaw in a common library used to read XML files lets attackers shut down programs that rely on it by feeding them specially made data.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Denial Of Service
- Component
- Library
- Class
- Denial of service
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
The parser enters unbounded recursion when processing XML parameter entities that reference themselves, exhausting the call stack and terminating the process.
Why it matters to the business
Services that parse untrusted XML can be forced offline with a single request, producing availability loss and potential cascading failures in dependent systems.
How an attack unfolds
An attacker crafts an XML document containing a self-referential parameter entity and submits it to any interface that invokes the vulnerable libxml2 parser; the recursion consumes stack space until the process crashes.
How to fix it
Upgrade libxml2 to a build containing commit 899a5d9f0ed13b8e32449a08a361e0de127dd961 (equivalent to 2.9.5 or newer) in all affected packages and rebuild any statically linked binaries.
How to confirm the fix worked
Confirm the installed libxml2 shared object or header reports a version at or above 2.9.5; recompile and retest applications against the fixed library; attempt to parse the original recursive entity test case and verify it now returns a controlled error instead of crashing.
Typical attack path
- Identify an endpoint or API that accepts XML input
- Prepare a minimal XML document with a recursive parameter entity
- Transmit the document over the network or via file upload
- Observe process termination and service unavailability
How to detect it
Review application and system logs for sudden crashes or segmentation faults immediately after XML processing; correlate with inbound XML payloads containing parameter entity declarations; monitor process exit codes and stack traces for libxml2 parser functions.
What your security team should do
- Prioritize patching all instances of libxml2 within the next maintenance window
- Inventory software that statically links or vendors libxml2 and schedule rebuilds
- Add the library to automated dependency scanning pipelines to prevent regression
The record
parser.c in libxml2 before 2.9.5 does not prevent infinite recursion in parameter entities.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| RubyGems | nokogiri | 0 | 1.8.1 |
| Alpine:v3.10 | clamav | 0 | 0.100.1-r0 |
| Alpine:v3.11 | clamav | 0 | 0.100.1-r0 |
| Alpine:v3.12 | clamav | 0 | 0.100.1-r0 |
| Alpine:v3.13 | clamav | 0 | 0.100.1-r0 |
| Alpine:v3.5 | clamav | 0 | 0.100.1-r0 |
| Alpine:v3.6 | clamav | 0 | 0.100.1-r0 |
| Alpine:v3.7 | clamav | 0 | 0.100.1-r0 |
| Alpine:v3.8 | clamav | 0 | 0.100.1-r0 |
| Alpine:v3.9 | clamav | 0 | 0.100.1-r0 |
| 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:7 | libxml2 | 0 | 2.8.0+dfsg1-7+wheezy11 |
| 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 |
| Mageia:6 | libxml2 | 0 | 2.9.7-1.mga6 |
| SUSE:HPE Helion OpenStack 8 | libxml2 | 0 | 2.9.4-46.54.3 |
| SUSE:HPE Helion OpenStack 8 | python-libxml2 | 0 | 2.9.4-46.54.3 |
| SUSE:Linux Enterprise Server 11 SP4 | libxml2 | 0 | 2.7.6-0.77.10.1 |
| SUSE:Linux Enterprise Server 11 SP4 | libxml2-python | 0 | 2.7.6-0.77.10.1 |
| SUSE:Linux Enterprise Server 12 SP2-BCL | libxml2 | 0 | 2.9.4-46.54.3 |
| SUSE:Linux Enterprise Server 12 SP2-BCL | python-libxml2 | 0 | 2.9.4-46.54.3 |
| SUSE:Linux Enterprise Server 12 SP3-BCL | libxml2 | 0 | 2.9.4-46.54.3 |
| SUSE:Linux Enterprise Server 12 SP3-BCL | python-libxml2 | 0 | 2.9.4-46.54.3 |
| SUSE:Linux Enterprise Server 12 SP3-LTSS | libxml2 | 0 | 2.9.4-46.54.3 |
| SUSE:Linux Enterprise Server 12 SP3-LTSS | python-libxml2 | 0 | 2.9.4-46.54.3 |
| SUSE:Linux Enterprise Server 12 SP4-LTSS | libxml2 | 0 | 2.9.4-46.54.3 |
| SUSE:Linux Enterprise Server 12 SP4-LTSS | python-libxml2 | 0 | 2.9.4-46.54.3 |
| SUSE:Linux Enterprise Server 12 SP5 | libxml2 | 0 | 2.9.4-46.54.3 |
| SUSE:Linux Enterprise Server 12 SP5 | python-libxml2 | 0 | 2.9.4-46.54.3 |
| SUSE:Linux Enterprise Server for SAP Applications 11 SP4 | libxml2 | 0 | 2.7.6-0.77.10.1 |
| SUSE:Linux Enterprise Server for SAP Applications 11 SP4 | libxml2-python | 0 | 2.7.6-0.77.10.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP3 | libxml2 | 0 | 2.9.4-46.54.3 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP3 | python-libxml2 | 0 | 2.9.4-46.54.3 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP4 | libxml2 | 0 | 2.9.4-46.54.3 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP4 | python-libxml2 | 0 | 2.9.4-46.54.3 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP5 | libxml2 | 0 | 2.9.4-46.54.3 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP5 | python-libxml2 | 0 | 2.9.4-46.54.3 |
| SUSE:Linux Enterprise Software Development Kit 11 SP4 | libxml2 | 0 | 2.7.6-0.77.10.1 |
| SUSE:Linux Enterprise Software Development Kit 12 SP5 | libxml2 | 0 | 2.9.4-46.54.3 |
| SUSE:OpenStack Cloud 8 | libxml2 | 0 | 2.9.4-46.54.3 |
| SUSE:OpenStack Cloud 8 | python-libxml2 | 0 | 2.9.4-46.54.3 |
| SUSE:OpenStack Cloud 9 | libxml2 | 0 | 2.9.4-46.54.3 |
| SUSE:OpenStack Cloud 9 | python-libxml2 | 0 | 2.9.4-46.54.3 |
| SUSE:OpenStack Cloud Crowbar 8 | libxml2 | 0 | 2.9.4-46.54.3 |
| SUSE:OpenStack Cloud Crowbar 8 | python-libxml2 | 0 | 2.9.4-46.54.3 |
| SUSE:OpenStack Cloud Crowbar 9 | libxml2 | 0 | 2.9.4-46.54.3 |
| SUSE:OpenStack Cloud Crowbar 9 | python-libxml2 | 0 | 2.9.4-46.54.3 |
| Ubuntu:14.04:LTS | libxml2 | 0 | 2.9.1+dfsg1-3ubuntu4.11 |
| Ubuntu:14.04:LTS | libxml2 | 0 | 2.9.1+dfsg1-3ubuntu4.13 |
| Ubuntu:16.04:LTS | libxml2 | 0 | 2.9.3+dfsg1-1ubuntu0.4 |
| 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
- GHSA-vcc3-rw6f-jv97 Duplicate Advisory: Use-after-free in libxml2 via Nokogiri::XML::Reader Also affects nokogiri
- GHSA-pxvg-2qj5-37jq Nokogiri updates packaged libxml2 to v2.10.4 to resolve multiple CVEs Also affects nokogiri
- GHSA-2qc6-mcvw-92cw Update bundled libxml2 to v2.10.3 to resolve multiple CVEs Also affects nokogiri
- GHSA-cgx6-hpwq-fhv5 Integer Overflow or Wraparound in libxml2 affects Nokogiri Also affects nokogiri
- GHSA-gx8x-g87m-h5q6 Denial of Service (DoS) in Nokogiri on JRuby Also affects nokogiri
- GHSA-xxx9-3xcr-gjj3 XML Injection in Xerces Java affects Nokogiri Also affects nokogiri
- GHSA-v6gp-9mmm-c6p5 Out-of-bounds Write in zlib affects Nokogiri Also affects nokogiri
- GHSA-fq42-c5rg-92c2 Vulnerable dependencies in Nokogiri Also affects nokogiri