Cross-site Scripting (XSS) Affecting ruby-nokogiri package, versions <1.19.7+dfsg-1


Severity

Recommended
low

Based on default assessment until relevant scores are available.

Threat Intelligence

EPSS
0.56% (48th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-DEBIANUNSTABLE-RUBYNOKOGIRI-22421983
  • published11 Nov 2026
  • disclosed10 Nov 2026

Introduced: 10 Nov 2026

NewCVE-2026-126063  (opens in a new tab)
CWE-79  (opens in a new tab)
CWE-116  (opens in a new tab)

How to fix?

Upgrade Debian:unstable ruby-nokogiri to version 1.19.7+dfsg-1 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream ruby-nokogiri package and not the ruby-nokogiri package as distributed by Debian. See How to fix? for Debian:unstable relevant fixed versions and status.

Nokogiri is an open source XML and HTML library for the Ruby programming language. From 1.12.0 until 1.19.5, the C extension on CRuby and TruffleRuby has a Nokogiri::HTML5 serializer that does not escape text inside noscript elements or angle brackets inside attribute values. When an application sanitizes untrusted HTML with the default parsing options, allows noscript, and sends serialized output to a scripting-enabled browser, the browser can parse markup that Nokogiri did not produce, enabling mutation cross-site scripting. Using parse_noscript_content_as_text: true is the recommended workaround, not the vulnerable default. JRuby is not affected because it does not implement Nokogiri::HTML5. This issue is fixed in version 1.19.5.