CVE-2017-5969
Medium · 4.7CVSS
4.7
EPSS
2.6%
Published
Apr 11, 2017
CISA due date
—
Cloudanix analysis
A problem in a common XML handling tool can make programs crash when they try to recover from badly formed data files.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- High
- Impact
- Denial Of Service
- Component
- Library
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
NULL pointer dereference when libxml2 processes a crafted XML document in recover mode, resulting in application crash.
Why it matters to the business
Applications relying on XML recovery parsing may experience unexpected crashes and service interruptions when handling untrusted documents.
How an attack unfolds
An attacker supplies a maliciously crafted XML document to an application that invokes libxml2's recover parsing option, triggering the dereference and denial of service.
How to fix it
Disable the recover parsing option for any untrusted XML input. Update to a newer version of libxml2 if a fix becomes available and test thoroughly before deployment.
How to confirm the fix worked
Attempt to parse known trigger XML documents with recover mode enabled and confirm the application no longer crashes after configuration changes or library updates.
Typical attack path
- Locate a target application that uses libxml2 recover mode for XML input
- Craft an XML document designed to trigger the NULL dereference
- Deliver the document through normal input channels such as file upload or network request
- Observe application crash and loss of service
How to detect it
Review application and system logs for segmentation faults or crashes occurring immediately after XML parsing operations; correlate with file uploads or network requests containing XML.
What your security team should do
- Audit all code paths that enable recover mode and remove it for production use
- Replace recover mode with strict parsing and proper error handling
- Monitor upstream libxml2 releases for any future corrections
- Add input validation and size limits around XML processing
The record
libxml2 2.9.4, when used in recover mode, allows remote attackers to cause a denial of service (NULL pointer dereference) via a crafted XML document. NOTE: The maintainer states "I would disagree of a CVE with the Recover parsing option which should only be used for manual recovery at least for XML parser.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Alpine:v3.10 | libxml2 | 0 | 2.9.4-r4 |
| Alpine:v3.11 | libxml2 | 0 | 2.9.4-r4 |
| Alpine:v3.12 | libxml2 | 0 | 2.9.4-r4 |
| Alpine:v3.13 | libxml2 | 0 | 2.9.4-r4 |
| Alpine:v3.14 | libxml2 | 0 | 2.9.4-r4 |
| Alpine:v3.15 | libxml2 | 0 | 2.9.4-r4 |
| Alpine:v3.16 | libxml2 | 0 | 2.9.4-r4 |
| Alpine:v3.17 | libxml2 | 0 | 2.9.4-r4 |
| Alpine:v3.18 | libxml2 | 0 | 2.9.4-r4 |
| Alpine:v3.19 | libxml2 | 0 | 2.9.4-r4 |
| Alpine:v3.2 | libxml2 | 0 | 2.9.4-r3 |
| Alpine:v3.20 | libxml2 | 0 | 2.9.4-r4 |
| Alpine:v3.21 | libxml2 | 0 | 2.9.4-r4 |
| Alpine:v3.22 | libxml2 | 0 | 2.9.4-r4 |
| Alpine:v3.3 | libxml2 | 0 | 2.9.4-r3 |
| Alpine:v3.4 | libxml2 | 0 | 2.9.4-r3 |
| Alpine:v3.5 | libxml2 | 0 | 2.9.4-r3 |
| Alpine:v3.6 | libxml2 | 0 | 2.9.4-r4 |
| Alpine:v3.7 | libxml2 | 0 | 2.9.4-r4 |
| Alpine:v3.8 | libxml2 | 0 | 2.9.4-r4 |
| Alpine:v3.9 | libxml2 | 0 | 2.9.4-r4 |
| Debian:11 | libxml2 | 0 | 2.9.4+dfsg1-5.1 |
| Debian:12 | libxml2 | 0 | 2.9.4+dfsg1-5.1 |
| Debian:13 | libxml2 | 0 | 2.9.4+dfsg1-5.1 |
| Debian:14 | libxml2 | 0 | 2.9.4+dfsg1-5.1 |
| 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 SP2 | libxml2 | 0 | 2.9.4-42.1 |
| SUSE:Linux Enterprise Desktop 12 SP2 | python-libxml2 | 0 | 2.9.4-42.1 |
| SUSE:Linux Enterprise Server 11 SP4 | libxml2 | 0 | 2.7.6-0.76.1 |
| SUSE:Linux Enterprise Server 11 SP4 | libxml2-python | 0 | 2.7.6-0.76.4 |
| SUSE:Linux Enterprise Server 12 SP2 | libxml2 | 0 | 2.9.4-42.1 |
| SUSE:Linux Enterprise Server 12 SP2 | python-libxml2 | 0 | 2.9.4-42.1 |
| SUSE:Linux Enterprise Server for Raspberry Pi 12 SP2 | libxml2 | 0 | 2.9.4-42.1 |
| SUSE:Linux Enterprise Server for Raspberry Pi 12 SP2 | python-libxml2 | 0 | 2.9.4-42.1 |
| SUSE:Linux Enterprise Server for SAP Applications 11 SP4 | libxml2 | 0 | 2.7.6-0.76.1 |
| SUSE:Linux Enterprise Server for SAP Applications 11 SP4 | libxml2-python | 0 | 2.7.6-0.76.4 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP2 | libxml2 | 0 | 2.9.4-42.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP2 | python-libxml2 | 0 | 2.9.4-42.1 |
| SUSE:Linux Enterprise Software Development Kit 11 SP4 | libxml2 | 0 | 2.7.6-0.76.1 |
| SUSE:Linux Enterprise Software Development Kit 12 SP2 | libxml2 | 0 | 2.9.4-42.1 |
| Ubuntu:Pro:14.04:LTS | libxml2 | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | libxml2 | 0 | No fix |
| openSUSE:Tumbleweed | libxml2 | 0 | 2.9.12-1.2 |
Related vulnerabilities
- 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-5131 Use-after-free vulnerability in libxml2 through 2.9.4, as used in Google Chrome before… Also affects libxml2
- CVE-2025-32415 In libxml2 before 2.13.8 and 2.14.x before 2.14.2, xmlSchemaIDCFillNodeTables in… Also affects libxml2
- CVE-2025-32414 In libxml2 before 2.13.8 and 2.14.x before 2.14.2, out-of-bounds memory access can occur… Also affects libxml2
- CVE-2025-24928 libxml2 before 2.12.10 and 2.13.x before 2.13.6 has a stack-based buffer overflow in… Also affects libxml2
- CVE-2025-27113 libxml2 before 2.12.10 and 2.13.x before 2.13.6 has a NULL pointer dereference in… Also affects libxml2
- CVE-2024-56171 libxml2 before 2.12.10 and 2.13.x before 2.13.6 has a use-after-free in… Also affects libxml2
- CVE-2017-16931 parser.c in libxml2 before 2.9.5 mishandles parameter-entity references because the NEXTL… Also affects libxml2