CVE-2026-126063
nokogiri: nokogiri: Cross-site scripting via unescaped content in HTML5 serializer
Overview
Description
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.
Source: OX vulnerability database
Severity
4.7 · LOW
CVSS 3.1 base score, scored by redhat.
- Attack vector
- Network
- Attack complexity
- High
- Privileges required
- None
- User interaction
- Required
- Scope
- Changed
- Confidentiality
- Low
- Integrity
- Low
- Availability
- None
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N
Weakness: CWE-79, CWE-116
Affected packages · 1
| Ecosystem | Package | Vulnerable | Fixed in |
|---|---|---|---|
| RubyGems | nokogiri | >=1.12.0, <1.19.5 | 1.19.5 |
Open a package to see all its vulnerabilities.
Operating systems · 17 fixes
chainguard 1 release · 10 packages
| Release | Package | Fixed in |
|---|---|---|
| logstash-8-19 | not affected | |
| pact-broker-docker | 2.142.0.2.120.0-r4 | |
| pact-broker-docker-fips | 2.142.0.2.120.0-r5 | |
| pghero +1 | 3.8.0-r13 | |
| kube-logging-operator | 6.9.0-r13 | |
| ruby3-4-rails-7-2 | 7.2.4-r2 |
4 more rows
debian 4 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 11 | ruby-nokogiri | affected |
| 12 | ruby-nokogiri | affected |
| 13 | ruby-nokogiri | affected |
| 14 | ruby-nokogiri | affected |
echo 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| ruby-nokogiri | affected |
wolfi 1 release · 2 packages
| Release | Package | Fixed in |
|---|---|---|
| kube-logging-operator | 6.9.0-r13 | |
| logstash-9-4 | 9.4.9-r1 |
References
- access.redhat.com https://access.redhat.com/security/cve/CVE-2026-126063
- github.com https://github.com/rubysec/ruby-advisory-db/blob/master/gems/nokogiri/GHSA-4p39-36wj-23h4.yml
- github.com https://github.com/sparklemotion/nokogiri
- github.com https://github.com/sparklemotion/nokogiri/commit/3e84df6ff7ab4d78f446e3a415430bd69a055d32
- github.com https://github.com/sparklemotion/nokogiri/commit/c6c0bffbdcd194694995acafeeed27326b0805f8
- github.com https://github.com/sparklemotion/nokogiri/pull/3752
- github.com https://github.com/sparklemotion/nokogiri/releases/tag/v1.19.5
- github.com https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-4p39-36wj-23h4
- nvd.nist.gov https://nvd.nist.gov/vuln/detail/CVE-2026-126063
- www.cve.org https://www.cve.org/CVERecord?id=CVE-2026-126063
OX Radar and Response Center
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.