CVE-2026-126063
Nokogiri: Mutation XSS through `noscript` content in Nokogiri's HTML5 serializer
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.
Fixes and workarounds
Fix
nokogiri (rubygems): GitHub reports patched versions 1.19.5. Check the advisory for the affected release branch.
Source: GitHub GHSA-4p39-36wj-23h4Fix
nokogiri (RubyGems): OSV reports a fixed version 1.19.5. Check the advisory for supported release branches.
Source: OSV GHSA-4p39-36wj-23h4Affected products and versions
| Product | Versions | Authority |
|---|---|---|
| nokogiri sparklemotion |
>= 1.12.0, < 1.19.5 (affected) | CNA: GitHub_M |
nokogirinokogiri
rubygems |
>= 1.12.0, < 1.19.5 (affected, GitHub advisory range) | GitHub GHSA-4p39-36wj-23h4 |
nokogirinokogiri
RubyGems |
1.12.0 (affected, RubyGems) 1.12.1 (affected, RubyGems) 1.12.2 (affected, RubyGems) 1.12.3 (affected, RubyGems) 1.12.4 (affected, RubyGems) 1.12.5 (affected, RubyGems) 1.13.0 (affected, RubyGems) 1.13.1 (affected, RubyGems) 1.13.10 (affected, RubyGems) 1.13.2 (affected, RubyGems) 1.13.3 (affected, RubyGems) 1.13.4 (affected, RubyGems) 1.13.5 (affected, RubyGems) 1.13.6 (affected, RubyGems) 1.13.7 (affected, RubyGems) 1.13.8 (affected, RubyGems) 1.13.9 (affected, RubyGems) 1.14.0 (affected, RubyGems) 1.14.0.rc1 (affected, RubyGems) 1.14.1 (affected, RubyGems) 1.14.2 (affected, RubyGems) 1.14.3 (affected, RubyGems) 1.14.4 (affected, RubyGems) 1.14.5 (affected, RubyGems) 1.15.0 (affected, RubyGems) 1.15.1 (affected, RubyGems) 1.15.2 (affected, RubyGems) 1.15.3 (affected, RubyGems) 1.15.4 (affected, RubyGems) 1.15.5 (affected, RubyGems) 1.15.6 (affected, RubyGems) 1.15.7 (affected, RubyGems) 1.16.0 (affected, RubyGems) 1.16.0.rc1 (affected, RubyGems) 1.16.1 (affected, RubyGems) 1.16.2 (affected, RubyGems) 1.16.3 (affected, RubyGems) 1.16.4 (affected, RubyGems) 1.16.5 (affected, RubyGems) 1.16.6 (affected, RubyGems) 1.16.7 (affected, RubyGems) 1.16.8 (affected, RubyGems) 1.17.0 (affected, RubyGems) 1.17.1 (affected, RubyGems) 1.17.2 (affected, RubyGems) 1.18.0 (affected, RubyGems) 1.18.0.rc1 (affected, RubyGems) 1.18.1 (affected, RubyGems) 1.18.10 (affected, RubyGems) 1.18.2 (affected, RubyGems) 1.18.3 (affected, RubyGems) 1.18.4 (affected, RubyGems) 1.18.5 (affected, RubyGems) 1.18.6 (affected, RubyGems) 1.18.7 (affected, RubyGems) 1.18.8 (affected, RubyGems) 1.18.9 (affected, RubyGems) 1.19.0 (affected, RubyGems) 1.19.1 (affected, RubyGems) 1.19.2 (affected, RubyGems) 1.19.3 (affected, RubyGems) 1.19.4 (affected, RubyGems) Ecosystem version events: introduced 1.12.0; fixed 1.19.5 Source events (ECOSYSTEM)
Other versions: unaffected |
OSV GHSA-4p39-36wj-23h4 |
Version ranges are source assertions. Check the vendor advisory and your installed configuration before determining exposure.
CVSS assessments
| Version / score | Vector | Authority |
|---|---|---|
| 4.0 / 2.3 low |
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N | CNA: GitHub_M |
| 4.0 / 2.3 low |
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X | NVD: [email protected] |
Exploit evidence
No exploit evidence in collected sources. This is not proof of no exploitation.
References
- https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-4p39-36wj-23h4CNA: GitHub_M · x_refsource_CONFIRM
- https://github.com/sparklemotion/nokogiri/pull/3752CNA: GitHub_M · x_refsource_MISC
- https://github.com/sparklemotion/nokogiri/commit/3e84df6ff7ab4d78f446e3a415430bd69a055d32CNA: GitHub_M · x_refsource_MISC
- https://github.com/sparklemotion/nokogiri/commit/c6c0bffbdcd194694995acafeeed27326b0805f8CNA: GitHub_M · x_refsource_MISC
- https://github.com/sparklemotion/nokogiri/releases/tag/v1.19.5CNA: GitHub_M · x_refsource_MISC
- https://github.com/sparklemotion/nokogiri/commit/3e84df6ff7ab4d78f446e3a415430bd69a055d32[email protected]
- https://github.com/sparklemotion/nokogiri/commit/c6c0bffbdcd194694995acafeeed27326b0805f8[email protected]
- https://github.com/sparklemotion/nokogiri/pull/3752[email protected]
- https://github.com/sparklemotion/nokogiri/releases/tag/v1.19.5[email protected]
- https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-4p39-36wj-23h4[email protected]
- https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-4p39-36wj-23h4GitHub Security Advisories · advisory
- https://github.com/advisories/GHSA-4p39-36wj-23h4OSV / GitHub Security Advisories · advisory
- https://osv.dev/vulnerability/GHSA-4p39-36wj-23h4OSV / GitHub Security Advisories · osv
For agents and automation
Read public disclosures for free as Markdown or JSON. Compatible browsers also expose native WebMCP tools to search disclosures, read this page, and discover API access.
Use the ontology-linked Cyber API with x402 pay per request, or a Y2 Pro or Elite API key with the intel:cyber scope.
Endpoints and access details
https://api.y2.dev/api/v2/cyber/cveshttps://api.y2.dev/api/v2/cyber/cves/{cveId}
A workspace owner or admin can create a Pro or Elite API key. Send Authorization: Bearer <Y2_API_KEY> from your trusted agent runtime.
For x402, omit Authorization and read the HTTP 402 payment challenge before signing a retry. Public browser tools do not make payments.