Skip to content

GHSA-7553-jr98-vx47 CVE-2020-7595

libxml as used in Nokogiri has an infinite loop in a certain end-of-file situation

High RubyGems
Severity
7.5 / 10
High · CVSS 3.1
Exploit chance (EPSS)
7.84%
Chance of exploitation in the next 30 days. Higher than 94.68% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-835 Loop with Unreachable Exit Condition ('Infinite Loop')
Fix
1.10.8
Upgrade nokogiri to this version or later

Description

xmlStringLenDecodeEntities in parser.c in libxml2 2.9.10 has an infinite loop in a certain end-of-file situation. The Nokogiri RubyGem has patched its vendored copy of libxml2 in order to prevent this issue from affecting nokogiri.

Affected versions

RubyGems

PackageVulnerableFixed in
nokogiri
< 1.10.8
1.10.8

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

nokogiri RubyGems → 1.10.8

bundler
bundle update nokogiri # Gemfile: gem "nokogiri", ">= 1.10.8"

Severity breakdown

CVSS 3.1 7.5

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

Weakness

CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop')

The product contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop.

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
GHSA-phwj-rprq-35pp
Nokogiri: Possible Use-After-Free when setting an attribute value via `Nokogiri::XML::Attr#value=` or `#content=`
High Also affects nokogiri
GHSA-wfpw-mmfh-qq69
Nokogiri: Possible Use-After-Free in XInclude Processing
Low Also affects nokogiri
GHSA-p67v-3w7g-wjg7
Nokogiri: Possible Use-After-Free when directly using `NokogirI::XML::XPathContext` beyond document lifetime
Medium Also affects nokogiri
GHSA-wjv4-x9w8-wm3h
Nokogiri: Possible Use-After-Free when setting `Document#root=` to an invalid node type
Medium Also affects nokogiri
GHSA-5prr-v3j2-97mh
Nokogiri: Possible Out-of-Bounds Read in `Nokogiri::XML::NodeSet#[]`
High Also affects nokogiri
GHSA-9cv2-cfxc-v4v2
Nokogiri: Null Pointer Dereference calling methods on uninitialized wrapper classes
High Also affects nokogiri
GHSA-8678-w3jw-xfc2
Nokogiri: XML::Schema on JRuby allows network requests when NONET is set, bypassing CVE-2020-26247
Low Also affects nokogiri
GHSA-5v8h-3h3q-446p
Nokogiri: Possible Use-After-Free when `Nokogiri::XML::Document#encoding=` raises an exception
High Also affects nokogiri
Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor