CVE-2017-9050
High · 7.5CVSS
7.5
EPSS
4.6%
Published
May 18, 2017
CISA due date
—
Cloudanix analysis
A problem in a widely used tool for reading XML data can cause programs to suddenly stop working when they receive certain bad inputs.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Denial Of Service
- Component
- Library
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Heap-based buffer over-read in xmlDictAddString function within dict.c causes denial of service through application crash when processing crafted input.
Why it matters to the business
Services and applications relying on XML parsing may experience sudden unavailability and require restarts, disrupting operations especially in high-volume environments processing untrusted data.
How an attack unfolds
An attacker supplies specially crafted XML input that reaches the xmlDictAddString function, triggering the incomplete bounds check from the prior CVE-2016-1839 fix and resulting in a crash. Public exploits exist that automate delivery of such inputs over the network.
How to fix it
Upgrade libxml2 to a version containing the complete fix for this and related dict.c issues; recompile or update dependent applications such as PHP interpreters accordingly.
How to confirm the fix worked
Confirm updated library version in use, execute regression tests with known triggering XML samples, and monitor for absence of crashes under load.
Typical attack path
- Identify target application or service using libxml2 for XML processing
- Craft or obtain malicious XML payload targeting dict.c parsing path
- Deliver payload via network request or file upload
- Trigger buffer over-read leading to immediate process termination
How to detect it
Review application and system logs for abrupt crashes in processes using libxml2 during XML handling; correlate with inbound XML traffic patterns and check for repeated failure events around dict.c code paths.
What your security team should do
- Prioritize patching libxml2 in all affected environments given public exploit availability
- Implement input validation and sandboxing around XML parsers where upgrades are delayed
- Add monitoring for application crashes correlated with XML processing activity
The record
libxml2 20904-GITv2.9.4-16-g0741801 is vulnerable to a heap-based buffer over-read in the xmlDictAddString function in dict.c. This vulnerability causes programs that use libxml2, such as PHP, to crash. This vulnerability exists because of an incomplete fix for CVE-2016-1839.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| RubyGems | nokogiri | 0 | 1.8.1 |
| Debian:11 | libxml2 | 0 | 2.9.4+dfsg1-3.1 |
| Debian:12 | libxml2 | 0 | 2.9.4+dfsg1-3.1 |
| Debian:13 | libxml2 | 0 | 2.9.4+dfsg1-3.1 |
| Debian:14 | libxml2 | 0 | 2.9.4+dfsg1-3.1 |
| Debian:7 | libxml2 | 0 | 2.8.0+dfsg1-7+wheezy8 |
| Debian:8 | libxml2 | 0 | 2.9.1+dfsg1-5+deb8u5 |
| Debian:9 | libxml2 | 0 | 2.9.4+dfsg1-2.2+deb9u1 |
| 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 SP2 | libxml2 | 0 | 2.9.4-36.1 |
| SUSE:Linux Enterprise Desktop 12 SP2 | libxml2 | 0 | 2.9.4-39.2 |
| SUSE:Linux Enterprise Desktop 12 SP2 | python-libxml2 | 0 | 2.9.4-36.1 |
| SUSE:Linux Enterprise Desktop 12 SP2 | python-libxml2 | 0 | 2.9.4-39.2 |
| 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-python | 0 | 2.7.6-0.69.3 |
| 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.69.1 |
| SUSE:Linux Enterprise Server 11 SP4 | libxml2-python | 0 | 2.7.6-0.69.3 |
| SUSE:Linux Enterprise Server 12 SP1-LTSS | libxml2 | 0 | 2.9.1-26.15.1 |
| SUSE:Linux Enterprise Server 12 SP1-LTSS | python-libxml2 | 0 | 2.9.1-26.15.1 |
| SUSE:Linux Enterprise Server 12 SP2 | libxml2 | 0 | 2.9.4-36.1 |
| SUSE:Linux Enterprise Server 12 SP2 | libxml2 | 0 | 2.9.4-39.2 |
| SUSE:Linux Enterprise Server 12 SP2 | python-libxml2 | 0 | 2.9.4-36.1 |
| SUSE:Linux Enterprise Server 12 SP2 | python-libxml2 | 0 | 2.9.4-39.2 |
| SUSE:Linux Enterprise Server 12-LTSS | libxml2 | 0 | 2.9.1-26.15.1 |
| SUSE:Linux Enterprise Server 12-LTSS | python-libxml2 | 0 | 2.9.1-26.15.1 |
| SUSE:Linux Enterprise Server for Raspberry Pi 12 SP2 | libxml2 | 0 | 2.9.4-36.1 |
| SUSE:Linux Enterprise Server for Raspberry Pi 12 SP2 | libxml2 | 0 | 2.9.4-39.2 |
| SUSE:Linux Enterprise Server for Raspberry Pi 12 SP2 | python-libxml2 | 0 | 2.9.4-36.1 |
| SUSE:Linux Enterprise Server for Raspberry Pi 12 SP2 | python-libxml2 | 0 | 2.9.4-39.2 |
| 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-python | 0 | 2.7.6-0.69.3 |
| SUSE:Linux Enterprise Server for SAP Applications 12 | libxml2 | 0 | 2.9.1-26.15.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 | python-libxml2 | 0 | 2.9.1-26.15.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP1 | libxml2 | 0 | 2.9.1-26.15.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP1 | python-libxml2 | 0 | 2.9.1-26.15.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP2 | libxml2 | 0 | 2.9.4-36.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP2 | libxml2 | 0 | 2.9.4-39.2 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP2 | python-libxml2 | 0 | 2.9.4-36.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP2 | python-libxml2 | 0 | 2.9.4-39.2 |
| SUSE:Linux Enterprise Software Development Kit 11 SP4 | libxml2 | 0 | 2.7.6-0.69.1 |
| SUSE:Linux Enterprise Software Development Kit 12 SP2 | libxml2 | 0 | 2.9.4-36.1 |
| SUSE:Linux Enterprise Software Development Kit 12 SP2 | libxml2 | 0 | 2.9.4-39.2 |
| Ubuntu:14.04:LTS | libxml2 | 0 | 2.9.1+dfsg1-3ubuntu4.10 |
| Ubuntu:16.04:LTS | libxml2 | 0 | 2.9.3+dfsg1-1ubuntu0.3 |
| gem | nokogiri | 2.9.4 | No fix |
| nuget | libxml2 | 2.9.4 | No fix |
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