Technical impact
From version 1.12.0 up to and including 1.19.4, Nokogiri’s HTML5 serializer fails to escape plain text inside “noscript” elements and fails to escape angle brackets that appear inside attribute values. When an application sanitizes untrusted HTML with the default parsing options and allows “noscript”, the serialized output is sent to a browser that can parse markup that Nokogiri did not generate. This allows an attacker to inject code into the page through mutation cross‑site scripting, potentially compromising user data, session tokens, or performing other client‑side attacks.
Affected Systems
The vulnerability affects the Nokogiri library used in Ruby applications, specifically versions 1.12.0 through 1.19.4. JRuby is not affected because its implementation does not include Nokogiri::HTML5. Applications that parse untrusted HTML and subsequently render it in a scripting‑enabled browser are susceptible.
Risk and Exploitability
The CVSS score of 2.3 classifies the flaw as low severity, and the EPSS score of less than 1% indicates a very low likelihood of exploitation. The vulnerability is listed as not included in the CISA KEV catalog. Exploitation requires that an application both sanitizes input using Nokogiri’s default settings and renders the result in a browser, so the risk is confined to web applications that expose unsanitized HTML output.
Github GHSA