{"id":"CVE-2026-126063","aliases":["GHSA-4p39-36wj-23h4"],"title":"Nokogiri: Mutation XSS through `noscript` content in Nokogiri's HTML5 serializer","titleSource":"OSV","descriptionSource":"OSV","declaredSeverity":"LOW","description":"### Summary\n\nNokogiri's HTML5 serializer did not escape text inside `noscript` elements, or `<` and `>` inside attribute values. When a document parsed with the default options is serialized, a browser with scripting enabled can parse the output into markup that Nokogiri's parser never produced. This is a mutation XSS for applications that sanitize untrusted HTML with `Nokogiri::HTML5`, allow `noscript` elements, and send the serialized output to browsers.\n\nNokogiri 1.19.5 escapes both, as the HTML standard's serialization algorithm requires. Text inside `noscript` is still emitted unescaped for documents parsed with `parse_noscript_content_as_text: true`.\n\nOnly the C extension (CRuby and TruffleRuby) is affected. JRuby does not implement `Nokogiri::HTML5`.\n\n### Severity\n\nThe Nokogiri maintainers have evaluated this as low severity (CVSS 2.3, `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`). Exploitation requires an application that allows `noscript` in sanitized HTML. Loofah and rails-html-sanitizer do not allow it by default, and Sanitize always removes it.\n\n### Mitigation\n\nUpgrade to Nokogiri 1.19.5 or later.\n\nApplications that sanitize HTML and allow `noscript` should parse with `parse_noscript_content_as_text: true` (available since Nokogiri 1.17.0), or remove `noscript` elements. This is the workaround for earlier versions, and it is recommended on every version: some content inside `noscript` is serialized unchanged, as the standard requires.\n\n### Credit\n\nThis issue was responsibly reported by @a-zara-n.","severity":"low","score":2.3,"published":"2026-11-10T20:14:40.408Z","modified":"2026-11-13T15:51:43.029Z","withdrawn":false,"knownExploited":false,"affected":[{"ecosystem":"RubyGems","name":"nokogiri","sources":[{"name":"OSV · GHSA-4p39-36wj-23h4","url":"https://osv.dev/vulnerability/GHSA-4p39-36wj-23h4"}],"ranges":[{"events":[{"introduced":"1.12.0"},{"fixed":"1.19.5"}],"type":"ECOSYSTEM"}],"versions":["1.12.0","1.12.1","1.12.2","1.12.3","1.12.4","1.12.5","1.13.0","1.13.1","1.13.10","1.13.2","1.13.3","1.13.4","1.13.5","1.13.6","1.13.7","1.13.8","1.13.9","1.14.0","1.14.0.rc1","1.14.1","1.14.2","1.14.3","1.14.4","1.14.5","1.15.0","1.15.1","1.15.2","1.15.3","1.15.4","1.15.5","1.15.6","1.15.7","1.16.0","1.16.0.rc1","1.16.1","1.16.2","1.16.3","1.16.4","1.16.5","1.16.6","1.16.7","1.16.8","1.17.0","1.17.1","1.17.2","1.18.0","1.18.0.rc1","1.18.1","1.18.10","1.18.2","1.18.3","1.18.4","1.18.5","1.18.6","1.18.7","1.18.8","1.18.9","1.19.0","1.19.1","1.19.2","1.19.3","1.19.4"],"fixed":["1.19.5"]}],"sourceAffected":[],"references":["https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-4p39-36wj-23h4","https://github.com/sparklemotion/nokogiri/pull/3752","https://github.com/sparklemotion/nokogiri/commit/3e84df6ff7ab4d78f446e3a415430bd69a055d32","https://github.com/sparklemotion/nokogiri/commit/c6c0bffbdcd194694995acafeeed27326b0805f8","https://github.com/rubysec/ruby-advisory-db/blob/master/gems/nokogiri/GHSA-4p39-36wj-23h4.yml","https://github.com/sparklemotion/nokogiri","https://github.com/sparklemotion/nokogiri/releases/tag/v1.19.5"],"sources":[{"name":"OSV","id":"GHSA-4p39-36wj-23h4","modified":"2026-11-10T21:00:04.024722735Z","url":"https://osv.dev/vulnerability/GHSA-4p39-36wj-23h4"},{"name":"CVE","id":"CVE-2026-126063","modified":"2026-11-13T15:51:43.029Z","url":"https://www.cve.org/CVERecord?id=CVE-2026-126063"}],"assessments":[{"source":"OSV","vector":"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","score":2.3},{"source":"GitHub_M","vector":"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","score":2.3}],"cve":{"records":[{"id":"CVE-2026-126063","source":"GitHub_M","state":"PUBLISHED","reasons":[],"replacements":[],"disputed":false,"unsupportedWhenAssigned":false,"reserved":"2026-11-10T17:07:43.283Z","published":"2026-11-10T20:14:40.408Z","modified":"2026-11-13T15:51:43.029Z"}],"publishers":[{"name":"GitHub_M","role":"CNA","organizationId":"a0819718-46f1-4df5-94e2-005712e83aaa","modified":"2026-11-10T20:14:40.408Z"},{"name":"CISA-ADP","role":"ADP","organizationId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","modified":"2026-11-13T15:51:43.029Z"}],"references":[{"url":"https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-4p39-36wj-23h4","tags":["x_refsource_CONFIRM"],"source":"GitHub_M"},{"url":"https://github.com/sparklemotion/nokogiri/pull/3752","tags":["x_refsource_MISC"],"source":"GitHub_M"},{"url":"https://github.com/sparklemotion/nokogiri/commit/3e84df6ff7ab4d78f446e3a415430bd69a055d32","tags":["x_refsource_MISC"],"source":"GitHub_M"},{"url":"https://github.com/sparklemotion/nokogiri/commit/c6c0bffbdcd194694995acafeeed27326b0805f8","tags":["x_refsource_MISC"],"source":"GitHub_M"},{"url":"https://github.com/sparklemotion/nokogiri/releases/tag/v1.19.5","tags":["x_refsource_MISC"],"source":"GitHub_M"}],"weaknesses":[{"id":"CWE-79","description":"CWE-79: Improper Neutralization of Input During Web Page Generation","source":"GitHub_M"},{"id":"CWE-116","description":"CWE-116: Improper Encoding or Escaping of Output","source":"GitHub_M"}],"applicability":[],"prioritization":[{"source":"CISA-ADP","type":"SSVC","role":"CISA Coordinator","timestamp":"2026-11-13T15:49:25.822174Z","decisions":[{"name":"Exploitation","value":"none"},{"name":"Automatable","value":"no"},{"name":"Technical Impact","value":"partial"}]}]},"products":[{"vendor":"sparklemotion","name":"nokogiri","platforms":[],"versions":[{"version":">= 1.12.0, < 1.19.5","status":"affected"}],"cpes":[],"source":"GitHub_M","url":"https://www.cve.org/CVERecord?id=CVE-2026-126063"}],"remediation":[],"observedAt":"2026-11-13T23:26:44.452Z","kev":{"status":"not-listed","checkedAt":"2026-11-15T03:20:35.359Z"},"coverage":[{"source":"NVD","status":"available","checkedAt":"2026-11-14T05:26:06.926Z","attemptedAt":"2026-11-14T05:26:06.926Z"},{"source":"GHSA","status":"available","checkedAt":"2026-11-14T05:20:32.652Z","attemptedAt":"2026-11-14T05:20:32.652Z"},{"source":"EUVD","status":"available","checkedAt":"2026-11-14T05:15:32.540Z","attemptedAt":"2026-11-14T05:15:32.540Z"},{"source":"EPSS","status":"available","checkedAt":"2026-11-14T05:15:31.481Z","attemptedAt":"2026-11-14T05:15:31.481Z"}],"evidence":[{"source":"FIRST EPSS","id":"CVE-2026-126063","url":"https://www.first.org/epss/","probability":0.00561,"percentile":0.47236,"date":"2026-11-13","checkedAt":"2026-11-14T05:15:31.481Z"},{"source":"ENISA EUVD","id":"EUVD-2026-122832","url":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-122832","modified":"Nov 13, 2026, 3:51:43 PM","score":2.3,"vector":"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","checkedAt":"2026-11-14T05:15:32.540Z"},{"source":"GitHub Advisory Database","id":"GHSA-4p39-36wj-23h4","url":"https://github.com/advisories/GHSA-4p39-36wj-23h4","modified":"2026-11-10T20:47:37Z","checkedAt":"2026-11-14T05:20:32.652Z"},{"source":"NVD","id":"CVE-2026-126063","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-126063","modified":"2026-11-13T16:18:02.683","score":2.3,"vector":"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","checkedAt":"2026-11-14T05:26:06.926Z"}],"aiSummary":null}