CVE-2018-25032 — Vulnerability in nokogiri — CVE Details
Nokogiri affected by zlib's Out-of-bounds Write vulnerability
What Should I Do?
Fix Within 2-4 Weeks
Moderate exploitation risk (51.73% probability in 30 days). Schedule remediation soon.
Does your project use an affected nokogiri version?
Paste your Gemfile.lock to check it for CVE-2018-25032 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
zlib 1.2.11 allows memory corruption when deflating (i.e., when compressing) if the input has many distant matches.
Advisory Timeline
- First published March 26, 2022 (1706 days ago).
- Last revised September 10, 2026 — 1629 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
gem install nokogiri -v 1.13.4
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 (+139 more) | 1.13.4 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-787Out-of-bounds WriteMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 7.5 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
References
- https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-v6gp-9mmm-c6p5WEB
- https://nvd.nist.gov/vuln/detail/CVE-2018-25032ADVISORY
- https://github.com/madler/zlib/issues/605WEB
- https://github.com/madler/zlib/commit/5c44459c3b28a9bd3283aaceab7c615f8020c531WEB
- https://www.oracle.com/security-alerts/cpujul2022.htmlWEB
- https://www.openwall.com/lists/oss-security/2022/03/28/3WEB
- https://www.openwall.com/lists/oss-security/2022/03/28/1WEB
- https://www.openwall.com/lists/oss-security/2022/03/24/1WEB
- https://www.debian.org/security/2022/dsa-5111WEB
- https://support.apple.com/kb/HT213257WEB
- https://support.apple.com/kb/HT213256WEB
- https://support.apple.com/kb/HT213255WEB
- https://security.netapp.com/advisory/ntap-20220729-0004WEB
- https://security.netapp.com/advisory/ntap-20220526-0009WEB
- https://security.gentoo.org/glsa/202210-42WEB
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/XOKFMSNQ5D5WGMALBNBXU3GE442V74WUWEB
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/VOKNP2L734AEL47NRYGVZIKEFOUBQY5YWEB
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/NS2D2GFPFGOJUL4WQ3DUAY7HF4VWQ77FWEB
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/JZZPTWRYQULAOL3AW7RZJNVZ2UONXCV4WEB
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/DF62MVMH3QUGMBDCB3DY2ERQ6EBHTADBWEB
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/DCZFIJBJTZ7CL5QXBFKTQ22Q26VINRUFWEB
- https://lists.debian.org/debian-lts-announce/2022/09/msg00023.htmlWEB
- https://lists.debian.org/debian-lts-announce/2022/05/msg00008.htmlWEB
- https://lists.debian.org/debian-lts-announce/2022/04/msg00000.htmlWEB
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/nokogiri/CVE-2018-25032.ymlWEB
- https://github.com/madler/zlib/compare/v1.2.11...v1.2.12WEB
- https://cert-portal.siemens.com/productcert/pdf/ssa-333517.pdfWEB
- https://seclists.org/fulldisclosure/2022/May/33WEB
- https://seclists.org/fulldisclosure/2022/May/35WEB
- https://seclists.org/fulldisclosure/2022/May/38WEB
- https://www.openwall.com/lists/oss-security/2022/03/25/2WEB
- https://www.openwall.com/lists/oss-security/2022/03/26/1WEB
Frequently Asked Questions
- What is CVE-2018-25032?
- Nokogiri affected by zlib's Out-of-bounds Write vulnerability. This vulnerability has been assigned a severity rating of HIGH (CVSS score: 7.5/10).
- How do I check if my project is affected by CVE-2018-25032?
- CVE-2018-25032 affects nokogiri. It has a 51.7% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2018-25032 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Significant impact if exploited, or exploitable with modest effort.
This places it in the top 5% of EPSS-scored vulnerabilities — 99.2% of tracked vulnerabilities score at or below it, so it is far more likely to be exploited than nearly all other tracked vulnerabilities.
Also Known As
Related CVEs
- CVE-2019-5477CRITICAL
Nokogiri Command Injection Vulnerability
- CVE-2015-8806HIGH
Denial of service or RCE from libxml2 and libxslt
- CVE-2017-9050HIGH
Out-of-bounds read in nokogiri
- CVE-2026-79770HIGH
Nokogiri CSS selector tokenizer has regular expression backtracking
- CVE-2019-13118HIGH
libxslt Type Confusion vulnerability that affects Nokogiri
- CVE-2022-50999HIGH
Integer Overflow or Wraparound in libxml2 affects Nokogiri
- CVE-2017-18258MEDIUM
Uncontrolled resource consumption in nokogiri
- CVE-2026-57434LOW
Nokogiri: Null Pointer Dereference calling methods on uninitialized wrapper classes