Read the docs
TI-2021-17940 Aliases CVE-2021-41098GHSA-2rr5-8q37-2w7h

Improper Restriction of XML External Entity Reference (XXE) in Nokogiri on JRuby

Priority LOW 36CWE-611Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
Low
Impact type
Information disclosure
Confidentiality · integrity · availability
High · None · None
Fix status
Partial Red Hat: 1 without a fix

Attack profile from CVSS 3.1 · NVD. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-611 and the CVSS impact.

Summary

Nokogiri is a Rubygem providing HTML, XML, SAX, and Reader parsers with XPath and CSS selector support. In Nokogiri v1.12.4 and earlier, on JRuby only, the SAX parser resolves external entities by default. Users of Nokogiri on JRuby who parse untrusted documents using any of these classes are affected: Nokogiri::XML::SAX::Parse, Nokogiri::HTML4::SAX::Parser or its alias Nokogiri::HTML::SAX::Parser, Nokogiri::XML::SAX::PushParser, and Nokogiri::HTML4::SAX::PushParser or its alias Nokogiri::HTML::SAX::PushParser. JRuby users should upgrade to Nokogiri v1.12.5 or later to receive a patch for this issue. There are no workarounds available for v1.12.4 or earlier. CRuby users are not affected.

Why it matters now

EPSS 0.0146 73rd percentileScored 2026-11-07
Fix Partial nokogiri (sparklemotion): 1.12.5nokogiri (RubyGems): 1.12.5Red Hat: 1 without a fix

SSVC decision points

Not available: CISA has not published SSVC decision points for this record.

Affected products

VendorProductAffected versionsFixed inStatusSource
sparklemotionnokogiribefore 1.12.51.12.5Patch availableCNA
—nokogiri (RubyGems)before 1.12.51.12.5Patch availableGHSA-2rr5-8q37-2w7h
  • nokogiri Vendorsparklemotion Affected before 1.12.5 Fixed in 1.12.5 Patch available CNA
  • nokogiri (RubyGems) Vendor— Affected before 1.12.5 Fixed in 1.12.5 Patch available GHSA-2rr5-8q37-2w7h

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:nokogiri:nokogiri:*:*:*:*:*:ruby:*:*before 1.12.5Vulnerablesparklemotion
  • cpe:2.3:a:nokogiri:nokogiri:*:*:*:*:*:ruby:*:* Versions before 1.12.5 Vulnerable ·sparklemotion

Remediation

  • Fix · CNA nokogiri (sparklemotion) Fixed in 1.12.5
  • Fix · GHSA-2rr5-8q37-2w7h nokogiri (RubyGems) Fixed in 1.12.5 Advisory →

Vendor assessments

Red Hat

Red Hat rating: Moderate. Red Hat's page for this CVE →

ProductStatusPlan or fix
Red Hat 3scale API Management Platform 2AffectedNo fix planned: Will not fix
Not affected: 3 products
  • CloudForms Management Engine 5
  • Red Hat Advanced Cluster Management for Kubernetes 2
  • Red Hat Satellite 6

Timeline

  1. 2026-10-02 Threatist record created from CVE-2021-41098
  2. 2026-10-03 Alias added: GHSA-2rr5-8q37-2w7h

References

  • TI-2022-11724 Improper Handling of Unexpected Data Type in Nokogiri CVSS 3.1HIGH 8.2
  • TI-2018-15259 zlib before 1.2.12 allows memory corruption when deflating (i.e., when compressing) if… CVSS 3.1HIGH 7.5
  • TI-2019-03885 OS command injection in Nokogiri CVSS 3.1CRITICAL 9.8
  • TI-2026-55247 Nokogiri before 1.19.3 ReDoS via CSS selector tokenizer CVSS 4.0HIGH 8.7
  • TI-2022-07536 Unchecked return value from xmlTextReaderExpand in Nokogiri CVSS 3.1HIGH 7.5
  • TI-2022-08648 Inefficient Regular Expression Complexity in Nokogiri CVSS 3.1HIGH 7.5
See all 20 →

Sources