CVE-2020-26247
XXE in Nokogiri
In short
Nokogiri, a popular Ruby library for parsing HTML and XML, trusted external resources in XML schemas by default, allowing attackers to read files or access internal networks. Updating to version 1.11.0.rc4 or later fixes this issue.
Technical detail
XXE vulnerability in Nokogiri's XML Schema parser (CWE-611) caused by default trust of external entities. An attacker can craft a malicious XML schema to trigger network requests to internal resources or read local files, potentially enabling SSRF or information disclosure attacks. Fixed in Nokogiri 1.11.0.rc4 by disabling external entity processing by default.
Summary generated and translated by AI from the official 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.
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:L/I:N/A:N
Affected products
sparklemotion · nokogiriWant to know if your infrastructure is exposed to this?
Talk to TrueHacking →References
https://github.com/sparklemotion/nokogiri/commit/9c87439d9afa14a365ff13e73adc809cb2c3d97bhttps://github.com/sparklemotion/nokogiri/releases/tag/v1.11.0.rc4https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-vr8q-g5c7-m54mhttps://hackerone.com/reports/747489https://lists.debian.org/debian-lts-announce/2021/06/msg00007.htmlhttps://lists.debian.org/debian-lts-announce/2022/10/msg00018.htmlhttps://rubygems.org/gems/nokogirihttps://security.gentoo.org/glsa/202208-29