CVE-2017-18258 — Uncontrolled resource consumption in nokogiri
Uncontrolled resource consumption in nokogiri
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (2.73%). Schedule for your next planned update.
Does your project use an affected nokogiri version?
Paste your Gemfile.lock to check it for CVE-2017-18258 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
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.
Advisory Timeline
- First published April 13, 2018 (3149 days ago).
- Last revised February 16, 2024 — 2135 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
gem install nokogiri -v 1.8.2
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: RubyGems (1).
| Package | Fixed In |
|---|---|
| nokogiri RubyGems · Affected: 1.0.0, 1.0.1, 1.0.2, 1.0.3 (+97 more) | 1.8.2 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-770Allocation of Resources Without LimitsMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 6.5 score means for each attack dimension.
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
References
- https://nvd.nist.gov/vuln/detail/CVE-2017-18258ADVISORY
- https://git.gnome.org/browse/libxml2/commit/?id=e2a9122b8dde53d320750451e9907a7dcb2ca8bbWEB
- https://github.com/advisories/GHSA-882p-jqgm-f45gADVISORY
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/nokogiri/CVE-2017-18258.ymlWEB
- https://kc.mcafee.com/corporate/index?page=content&id=SB10284WEB
- https://lists.debian.org/debian-lts-announce/2018/09/msg00035.htmlWEB
- https://lists.debian.org/debian-lts-announce/2020/09/msg00009.htmlWEB
- https://security.netapp.com/advisory/ntap-20190719-0001WEB
- https://usn.ubuntu.com/3739-1WEB
Frequently Asked Questions
- What is CVE-2017-18258?
- Uncontrolled resource consumption in nokogiri. This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 6.5/10).
- How do I check if my project is affected by CVE-2017-18258?
- CVE-2017-18258 affects nokogiri. It has a 2.7% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2017-18258 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Exploitation requires specific conditions, or the impact is limited.
This places it in the top quartile of EPSS-scored vulnerabilities — 86.8% of tracked vulnerabilities score at or below it, so it is more likely to be exploited than most of the tracked corpus.
Also Known As
Related CVEs
- CVE-2019-11068CRITICAL
Nokogiri vulnerable to libxslt protection mechanism bypass
- CVE-2019-18197HIGH
Nokogiri affected by libxslt Use of Uninitialized Resource/Use After Free vulnerability
- CVE-2022-23476HIGH
Unchecked return value from xmlTextReaderExpand
- CVE-2017-15412HIGH
Nokogiri gem, via libxml, is affected by DoS vulnerabilities
- CVE-2021-3518HIGH
Nokogiri Implements libxml2 version vulnerable to use-after-free
- CVE-2019-5815HIGH
Nokogiri implementation of libxslt vulnerable to heap corruption
- CVE-2021-3537MEDIUM
Nokogiri Implements libxml2 version vulnerable to null pointer dereferencing
- CVE-2026-79771MEDIUM
Nokogiri XSLT transform has a memory leak