CVE-2017-8872
Critical · 9.1CVSS
9.1
EPSS
2.3%
Published
May 10, 2017
CISA due date
—
Cloudanix analysis
A long-known flaw in a library used to read web data could let attackers crash programs or see bits of information they should not, so updating the affected software removes the problem.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Data Exposure
- Component
- Library
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
A buffer over-read in the htmlParseTryOrFinish function of libxml2 allows out-of-bounds memory access during parsing of crafted HTML, enabling denial of service via crash or disclosure of adjacent memory contents.
Why it matters to the business
Applications that parse untrusted HTML or XML may experience unexpected downtime or exposure of sensitive in-memory data; although the issue is years old with minimal observed exploitation, organizations using affected dependency chains must still address it to eliminate residual risk.
How an attack unfolds
An attacker supplies a malformed HTML document to any application that invokes the vulnerable parser; when htmlParseTryOrFinish processes the input, the over-read occurs, potentially crashing the process or returning memory fragments to the attacker.
How to fix it
Upgrade all listed topgrade packages (topgrade, topgrade-bash-completion, topgrade-doc, topgrade-fish-completion, topgrade-zsh-completion) on both Chainguard and Wolfi to version 15.0.0-r0 or newer; rebuild and redeploy any containers or images that embed these packages.
How to confirm the fix worked
Confirm installed package versions meet or exceed the fixed releases, re-run unit tests that exercise HTML parsing, and optionally apply memory-error detectors during regression testing with known malformed inputs.
Typical attack path
- Locate a service or tool that accepts untrusted HTML and uses the vulnerable libxml2 version
- Craft a minimal HTML payload that triggers the parser flaw
- Deliver the payload through network input, file upload, or command-line argument
- Observe application crash or capture any leaked memory returned in responses
How to detect it
Search application and system logs for segmentation faults or abnormal terminations during HTML/XML parsing; review process core dumps or memory dumps for signs of unexpected data exposure around the parser component.
What your security team should do
- Immediately schedule updates for all affected topgrade packages to 15.0.0-r0
- Scan container images and build pipelines for older libxml2 or topgrade versions
- Add dependency pinning and automated vulnerability scanning to prevent reintroduction
- Review logging for any historical parser-related crashes that might indicate prior probing
The record
The htmlParseTryOrFinish function in HTMLparser.c in libxml2 2.9.4 allows attackers to cause a denial of service (buffer over-read) or information disclosure.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:11 | libxml2 | 0 | 2.9.4+dfsg1-6.1 |
| Debian:12 | libxml2 | 0 | 2.9.4+dfsg1-6.1 |
| Debian:13 | libxml2 | 0 | 2.9.4+dfsg1-6.1 |
| Debian:14 | libxml2 | 0 | 2.9.4+dfsg1-6.1 |
| Debian:9 | libxml2 | 0 | 2.9.4+dfsg1-2.2+deb9u3 |
| SUSE:Linux Enterprise Desktop 12 SP2 | libxml2 | 0 | 2.9.4-46.3.2 |
| SUSE:Linux Enterprise Desktop 12 SP2 | python-libxml2 | 0 | 2.9.4-46.3.2 |
| SUSE:Linux Enterprise Desktop 12 SP3 | libxml2 | 0 | 2.9.4-46.3.2 |
| SUSE:Linux Enterprise Desktop 12 SP3 | python-libxml2 | 0 | 2.9.4-46.3.2 |
| SUSE:Linux Enterprise Server 11 SP4 | libxml2 | 0 | 2.7.6-0.77.3.2 |
| SUSE:Linux Enterprise Server 11 SP4 | libxml2-python | 0 | 2.7.6-0.77.3.5 |
| SUSE:Linux Enterprise Server 12 SP2 | libxml2 | 0 | 2.9.4-46.3.2 |
| SUSE:Linux Enterprise Server 12 SP2 | python-libxml2 | 0 | 2.9.4-46.3.2 |
| SUSE:Linux Enterprise Server 12 SP3 | libxml2 | 0 | 2.9.4-46.3.2 |
| SUSE:Linux Enterprise Server 12 SP3 | python-libxml2 | 0 | 2.9.4-46.3.2 |
| SUSE:Linux Enterprise Server for Raspberry Pi 12 SP2 | libxml2 | 0 | 2.9.4-46.3.2 |
| SUSE:Linux Enterprise Server for Raspberry Pi 12 SP2 | python-libxml2 | 0 | 2.9.4-46.3.2 |
| SUSE:Linux Enterprise Server for SAP Applications 11 SP4 | libxml2 | 0 | 2.7.6-0.77.3.2 |
| SUSE:Linux Enterprise Server for SAP Applications 11 SP4 | libxml2-python | 0 | 2.7.6-0.77.3.5 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP2 | libxml2 | 0 | 2.9.4-46.3.2 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP2 | python-libxml2 | 0 | 2.9.4-46.3.2 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP3 | libxml2 | 0 | 2.9.4-46.3.2 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP3 | python-libxml2 | 0 | 2.9.4-46.3.2 |
| SUSE:Linux Enterprise Software Development Kit 11 SP4 | libxml2 | 0 | 2.7.6-0.77.3.2 |
| SUSE:Linux Enterprise Software Development Kit 12 SP2 | libxml2 | 0 | 2.9.4-46.3.2 |
| SUSE:Linux Enterprise Software Development Kit 12 SP3 | libxml2 | 0 | 2.9.4-46.3.2 |
| Ubuntu:18.04:LTS | libxml2 | 0 | 2.9.4+dfsg1-6.1ubuntu1 |
| Ubuntu:18.04:LTS | libxml2 | 0 | 2.9.4+dfsg1-6.1ubuntu1.4 |
| Ubuntu:20.04:LTS | libxml2 | 0 | 2.9.10+dfsg-5ubuntu0.20.04.1 |
| Ubuntu:Pro:14.04:LTS | libxml2 | 0 | 2.9.1+dfsg1-3ubuntu4.13+esm2 |
| Ubuntu:Pro:16.04:LTS | libxml2 | 0 | 2.9.3+dfsg1-1ubuntu0.7+esm1 |
| nuget | libxml2 | 2.9.4 | No fix |
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-2016-9318 libxml2 2.9.4 and earlier, as used in XMLSec 1.2.23 and earlier and other products, does… 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