Nokogiri: Mutation XSS through `noscript` content in Nokogiri's HTML5 serializer
CVE-2026-126063Published 10 Nov 2026, 20:14 UTC
Real-world risk
0.8/ 10Low
Routine
If the vulnerable configuration applies to you: 1.8
PreliminaryFrom the CVSS vector only · confidence low
CVSS
2.3
scored by the vendor (CNA), CVSS 4.0
In plain words
No plain-language summary yet. The original description is below.
Original description (from GitHub_M)
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.
Am I affected?
| Product | Affected versions (from the sources) | Fixed in |
|---|---|---|
| nokogiriNiche | >= 1.12.0, < 1.19.5 | 1.19.5 |
What to do
Update to a fixed version: 1.19.5.
Why this score
| Factor | Value | Evidence | × |
|---|---|---|---|
| Impact | MinorReflected XSS, CSRF with low effect, open redirect, minor leak | From the CVSS vector | 0.30 |
| Attacker position | InternetAnyone on the Internet can reach a typical deployment | From the CVSS vector | 1.00 |
| Privileges needed | NoneNo account | From the CVSS vector | 1.00 |
| Victim interaction | RoutineA normal action: open a file, visit a page, click a link | From the CVSS vector | 0.70 |
| Configuration | UncommonNeeds a non-default feature that a minority enables | From the CVSS vector | 0.45 |
| Reliability | ReliableDeterministic: injection, logic bug, path traversal | From the CVSS vector | 1.00 |
Threat level T1: Nothing known (× 0.85)
The default for a new disclosure
EPSS 0.6% chance of exploitation in 30 days (percentile 48), as of 2026-12-05.
The arithmetic
- Prerequisites multiplied together0.315
- Threat T1: Nothing known0.850
- 10 × impact 0.3 × prerequisites 0.315 × threat 0.850.803
- Rounded to one decimal between 0.1 and 100.8
Exploitation and evidence timeline
- 10 Nov 2026 Published
- 3 Dec 2026 Risk 0.8 (cvss fallback)
Weakness
CWE-79, CWE-116
References
- https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-4p39-36wj-23h4vendor-advisory
- https://github.com/sparklemotion/nokogiri/pull/3752misc
- https://github.com/sparklemotion/nokogiri/commit/3e84df6ff7ab4d78f446e3a415430bd69a055d32misc
- https://github.com/sparklemotion/nokogiri/commit/c6c0bffbdcd194694995acafeeed27326b0805f8misc
- https://github.com/sparklemotion/nokogiri/releases/tag/v1.19.5misc
- CVE-2026-126063 on CVE.org