CVE-2017-18258
Description
The xz_head function in xzlib.c in libxml2 before 2.9.6 allows remote attackers to cause a denial of service (memory consumption) via a crafted LZMA file, because the decoder functionality does not restrict memory usage to what is required for a legitimate file.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
libxml2 before 2.9.6 contains uncontrolled memory consumption in LZMA decompression, allowing remote denial of service via crafted file.
Vulnerability
The xz_head function in xzlib.c of libxml2 versions prior to 2.9.6 does not restrict memory allocation during LZMA file decompression. An attacker can trigger excessive memory consumption by providing a crafted LZMA file that causes the decoder to allocate far more memory than required for a legitimate file. This impacts all users of libxml2 below the fixed 2.9.6 release [1][2].
Exploitation
An attacker needs only to supply a specially crafted LZMA file to an application that uses libxml2 for parsing, such as via a network service or when processing user-uploaded files. The attack requires no authentication or special privileges; it can be delivered remotely. The file triggers a path in xz_head that requests a decompression buffer size much larger than the actual data, leading to uncontrolled growth of allocated memory [1][4].
Impact
Successful exploitation leads to uncontrolled memory consumption, resulting in a denial of service (DoS) as the libxml2 process exhausts system memory. This can cause the affected application or service to become unresponsive or crash. No information disclosure or code execution is reported from this vulnerability [1][2].
Mitigation
Fixed in libxml2 version 2.9.6, released on 2017-11-28 [1]. Users should upgrade to 2.9.6 or later. For distributions like Ubuntu, the fix was included in updates such as USN-3739-1 (e.g., libxml2 version 2.9.4+dfsg1-6.5ubuntu1 for Ubuntu 18.04 LTS) [2]. Ruby users relying on nokogiri must update to version 1.8.2 or later, which bundles the fixed libxml2 [3][4]. No workaround is available if upgrading is not possible. The CVE is not listed in CISA's Known Exploited Vulnerabilities catalog.
AI Insight generated on May 22, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
nokogiriRubyGems | < 1.8.2 | 1.8.2 |
Affected products
8- ghsa-coords8 versionspkg:gem/nokogiripkg:rpm/suse/libxml2&distro=SUSE%20Linux%20Enterprise%20Desktop%2012%20SP3pkg:rpm/suse/libxml2&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP3pkg:rpm/suse/libxml2&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2012%20SP3pkg:rpm/suse/libxml2&distro=SUSE%20Linux%20Enterprise%20Software%20Development%20Kit%2012%20SP3pkg:rpm/suse/python-libxml2&distro=SUSE%20Linux%20Enterprise%20Desktop%2012%20SP3pkg:rpm/suse/python-libxml2&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP3pkg:rpm/suse/python-libxml2&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2012%20SP3
< 1.8.2+ 7 more
- (no CPE)range: < 1.8.2
- (no CPE)range: < 2.9.4-46.15.1
- (no CPE)range: < 2.9.4-46.15.1
- (no CPE)range: < 2.9.4-46.15.1
- (no CPE)range: < 2.9.4-46.15.1
- (no CPE)range: < 2.9.4-46.15.1
- (no CPE)range: < 2.9.4-46.15.1
- (no CPE)range: < 2.9.4-46.15.1
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
11- github.com/advisories/GHSA-882p-jqgm-f45gghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2017-18258ghsaADVISORY
- usn.ubuntu.com/3739-1/mitrevendor-advisoryx_refsource_UBUNTU
- git.gnome.org/browse/libxml2/commit/ghsax_refsource_MISCWEB
- github.com/rubysec/ruby-advisory-db/blob/master/gems/nokogiri/CVE-2017-18258.ymlghsaWEB
- kc.mcafee.com/corporate/indexghsax_refsource_CONFIRMWEB
- lists.debian.org/debian-lts-announce/2018/09/msg00035.htmlghsamailing-listx_refsource_MLISTWEB
- lists.debian.org/debian-lts-announce/2020/09/msg00009.htmlghsamailing-listx_refsource_MLISTWEB
- security.netapp.com/advisory/ntap-20190719-0001ghsaWEB
- security.netapp.com/advisory/ntap-20190719-0001/mitrex_refsource_CONFIRM
- usn.ubuntu.com/3739-1ghsaWEB
News mentions
0No linked articles in our index yet.