CVE-2017-16932: Nokogiri Denial of Service Vulnerability
HIGHCVE-2017-16932 is a HIGH (CVSS 7.5) denial of service vulnerability (CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop')) affecting Nokogiri libraries in the RubyGems ecosystem. The issue involves nokogiri gem, via libxml, is affected by dos vulnerabilities. Remediation is available by upgrading affected packages to version 1.8.1.
CVE-2017-16932 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2017-16932
To remediate this vulnerability, upgrade all affected Nokogiri dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade nokogiri to 1.8.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for nokogiri
How to Check if You Are Affected
To determine whether your application is affected by CVE-2017-16932, inspect your project dependencies for Nokogiri:
inspect dependencies for nokogiri
Analyze the terminal output to locate any version of Nokogiri in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.8.1), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop'), where the product contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop. In Nokogiri, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2017-16932 Affected Nokogiri Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
nokogiri
|
RubyGems |
< 1.8.1
|
1.8.1
|
References
Frequently Asked Questions
What is CVE-2017-16932?
Which Nokogiri versions are affected?
What version fixes CVE-2017-16932?
Is nokogiri affected?
What is the CVSS score of CVE-2017-16932?
What CWE is associated with CVE-2017-16932?
How can I check RubyGems dependencies for CVE-2017-16932?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-x2fm-93ww-ggvx",
"modified" : "2023-06-09T23:06:12Z",
"published" : "2022-05-13T01:02:39Z",
"aliases" : [ "CVE-2017-16932" ],
"summary" : "Nokogiri gem, via libxml, is affected by DoS vulnerabilities",
"details" : "parser.c in libxml2 before 2.9.5 does not prevent infinite recursion in parameter entities.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "RubyGems",
"name" : "nokogiri"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.8.1"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2017-16932"
}, {
"type" : "WEB",
"url" : "https://github.com/sparklemotion/nokogiri/issues/1714"
}, {
"type" : "WEB",
"url" : "https://github.com/GNOME/libxml2/commit/899a5d9f0ed13b8e32449a08a361e0de127dd961"
}, {
"type" : "WEB",
"url" : "https://blog.clamav.net/2018/07/clamav-01001-has-been-released.html"
}, {
"type" : "WEB",
"url" : "https://bugzilla.gnome.org/show_bug.cgi?id=759579"
}, {
"type" : "WEB",
"url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/nokogiri/CVE-2017-16932.yml"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread.html/r58af02e294bd07f487e2c64ffc0a29b837db5600e33b6e698b9d696b@%3Cissues.bookkeeper.apache.org%3E"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread.html/rf4c02775860db415b4955778a131c2795223f61cb8c6a450893651e4@%3Cissues.bookkeeper.apache.org%3E"
}, {
"type" : "WEB",
"url" : "https://lists.debian.org/debian-lts-announce/2017/11/msg00041.html"
}, {
"type" : "WEB",
"url" : "https://lists.debian.org/debian-lts-announce/2022/04/msg00004.html"
}, {
"type" : "WEB",
"url" : "https://usn.ubuntu.com/3739-1"
}, {
"type" : "WEB",
"url" : "http://xmlsoft.org/news.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-835" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2023-06-09T23:06:12Z",
"nvd_published_at" : "2017-11-23T21:29:00Z"
}
}