XXE in Nokogiri
CVE-2021-41098
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.
Vulnerability class: XXE (XML External Entity)
Published · last modified .
CVSS v3 metric
CVSS v3 base score 7.5 (High). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N.
EPSS exploit prediction
EPSS: 0.015 (73.4th percentile), scored .
Low probability of exploitation in the next 30 days, but still tracked. 73rd percentile — 73.4% of CVEs in the catalogue have a lower EPSS than this one. How to read EPSS.
EPSS over last 30 days · oldest: 0.014 · newest: 0.015 · change: +0.000
Affected products
- Nokogiri
- Sparklemotion Nokogiri — versions < 1.12.5
Weakness classification (CWE)
References
- github.com/sparklemotion/nokogiri/security/advisories/GHSA-2rr5-8q37-2w7h (Third Party Advisory)
- github.com/sparklemotion/nokogiri/commit/5bf729ff3cc84709ee3c3248c981584088bf9f… (Patch, Third Party Advisory)
Frequently asked questions
- What is CVE-2021-41098?
- CVE-2021-41098 is a high-severity vulnerability in Nokogiri, classified under Improper Restriction of XML External Entity Reference (XXE). CVSS score: 7.5/10. Published 2021-09-27.
- How severe is CVE-2021-41098?
- High severity. CVSS v3 base score is 7.5 out of 10.