What’s Vulnerable › Vulnerabilities
CVE-2020-26247: XXE in Nokogiri
- Severity: medium (CVSS 4.3 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 1.2% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2020-12-30 · updated 2026-06-17
- Weakness: CWE-611
Description
Nokogiri is a Rubygem providing HTML, XML, SAX, and Reader parsers with XPath and CSS selector support. In Nokogiri before version 1.11.0.rc4 there is an XXE vulnerability. XML Schemas parsed by Nokogiri::XML::Schema are trusted by default, allowing external resources to be accessed over the network, potentially enabling XXE or SSRF attacks. This behavior is counter to the security policy followed by Nokogiri maintainers, which is to treat all input as untrusted by default whenever possible. This is fixed in Nokogiri version 1.11.0.rc4.
Affected products
- Debian Linux: 9.0, 10.0
- sparklemotion nokogiri: before 1.11.0; 1.11.0-rc1, 1.11.0-rc2, 1.11.0-rc3 — fixed in 1.11.0
- Rubygems Nokogiri: before 1.11.0; 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5 (+118) — fixed in 1.11.0
How to fix
Upgrade to a fixed version: sparklemotion nokogiri 1.11.0; Rubygems Nokogiri 1.11.0. Check the vendor advisory for mitigations.
References
- https://github.com/sparklemotion/nokogiri/commit/9c87439d9afa14a365ff13e73adc809cb2c3d97b
- https://github.com/sparklemotion/nokogiri/releases/tag/v1.11.0.rc4
- https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-vr8q-g5c7-m54m
- https://hackerone.com/reports/747489
- https://lists.debian.org/debian-lts-announce/2021/06/msg00007.html
- https://lists.debian.org/debian-lts-announce/2022/10/msg00018.html
- https://rubygems.org/gems/nokogiri
- https://security.gentoo.org/glsa/202208-29
- https://github.com/sparklemotion/nokogiri/commit/9c87439d9afa14a365ff13e73adc809cb2c3d97b
- https://github.com/sparklemotion/nokogiri/releases/tag/v1.11.0.rc4
- https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-vr8q-g5c7-m54m
- https://hackerone.com/reports/747489
Get alerted when CVE-2020-26247 or the next vulnerability affects your stack