CVE-2020-7595: Nokogiri Libxml As Used Vulnerability
HIGHCVE-2020-7595 is a HIGH (CVSS 7.5) libxml as used vulnerability (CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop')) affecting Nokogiri libraries in the RubyGems ecosystem. The issue involves libxml as used in nokogiri has an infinite loop in a certain end-of-file situation. Remediation is available by upgrading affected packages to version 1.10.8.
CVE-2020-7595 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.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2020-7595
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.10.8
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-2020-7595, 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.10.8), 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-2020-7595 Affected Nokogiri Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
nokogiri
|
RubyGems |
< 1.10.8
|
1.10.8
|
References
Frequently Asked Questions
What is CVE-2020-7595?
Which Nokogiri versions are affected?
What version fixes CVE-2020-7595?
Is nokogiri affected?
What is the CVSS score of CVE-2020-7595?
What CWE is associated with CVE-2020-7595?
How can I check RubyGems dependencies for CVE-2020-7595?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-7553-jr98-vx47",
"modified" : "2022-04-22T17:29:45Z",
"published" : "2020-02-24T19:12:36Z",
"aliases" : [ "CVE-2020-7595" ],
"summary" : "libxml as used in Nokogiri has an infinite loop in a certain end-of-file situation",
"details" : "xmlStringLenDecodeEntities in parser.c in libxml2 2.9.10 has an infinite loop in a certain end-of-file situation.\nThe Nokogiri RubyGem has patched its vendored copy of libxml2 in order to prevent this issue from affecting nokogiri.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/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.10.8"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-7595"
}, {
"type" : "WEB",
"url" : "https://github.com/sparklemotion/nokogiri/issues/1992"
}, {
"type" : "WEB",
"url" : "https://www.oracle.com/security-alerts/cpuoct2021.html"
}, {
"type" : "WEB",
"url" : "https://www.oracle.com/security-alerts/cpujul2022.html"
}, {
"type" : "WEB",
"url" : "https://www.oracle.com/security-alerts/cpujul2020.html"
}, {
"type" : "WEB",
"url" : "https://www.oracle.com/security-alerts/cpuapr2022.html"
}, {
"type" : "WEB",
"url" : "https://usn.ubuntu.com/4274-1"
}, {
"type" : "WEB",
"url" : "https://us-cert.cisa.gov/ics/advisories/icsa-21-103-08"
}, {
"type" : "WEB",
"url" : "https://security.netapp.com/advisory/ntap-20200702-0005"
}, {
"type" : "WEB",
"url" : "https://security.gentoo.org/glsa/202010-04"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/JDPF3AAVKUAKDYFMFKSIQSVVS3EEFPQH"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/5R55ZR52RMBX24TQTWHCIWKJVRV6YAWI"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/545SPOI3ZPPNPX4TFRIVE4JVRTJRKULL"
}, {
"type" : "WEB",
"url" : "https://lists.debian.org/debian-lts-announce/2020/09/msg00009.html"
}, {
"type" : "WEB",
"url" : "https://gitlab.gnome.org/GNOME/libxml2/commit/0e1a49c89076"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/sparklemotion/nokogiri"
}, {
"type" : "WEB",
"url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/nokogiri/CVE-2020-7595.yml"
}, {
"type" : "WEB",
"url" : "https://cert-portal.siemens.com/productcert/pdf/ssa-292794.pdf"
}, {
"type" : "WEB",
"url" : "http://lists.opensuse.org/opensuse-security-announce/2020-05/msg00047.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-835" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2020-02-18T18:58:16Z",
"nvd_published_at" : "2020-01-21T23:15:00Z"
}
}