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.
{
"cna_assigner": "GitHub_M",
"cwe_ids": [
"CWE-116",
"CWE-79"
],
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/126xxx/CVE-2026-126063.json"
}{
"extracted_events": [
{
"range": [
{
"introduced": "1.12.0"
},
{
"fixed": "1.19.5"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StringRangeExpression"
},
{
"range": [
{
"fixed": "3e84df6ff7ab4d78f446e3a415430bd69a055d32"
}
],
"source": "REFERENCES_COMMIT"
},
{
"range": [
{
"fixed": "c6c0bffbdcd194694995acafeeed27326b0805f8"
}
],
"source": "REFERENCES_COMMIT"
},
{
"original_tag": "v1.19.5",
"range": [
{
"fixed": "724ef475332fb7378111e8e30d14eda6cdf33b1e"
}
],
"source": "REFERENCES_TAG"
}
]
}
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-126063.json"
[
{
"deprecated": false,
"digest": {
"function_hash": "159848856105768869530107496787884762821",
"length": 195
},
"id": "CVE-2026-126063-0c84cc1f",
"signature_type": "Function",
"signature_version": "v1",
"source": "https://github.com/sparklemotion/nokogiri/commit/3e84df6ff7ab4d78f446e3a415430bd69a055d32",
"target": {
"file": "ext/nokogiri/xml_node.c",
"function": "html_standard_serialize"
}
},
{
"deprecated": false,
"digest": {
"function_hash": "203224288994697015179501685702418264524",
"length": 2671
},
"id": "CVE-2026-126063-12b7bcc1",
"signature_type": "Function",
"signature_version": "v1",
"source": "https://github.com/sparklemotion/nokogiri/commit/3e84df6ff7ab4d78f446e3a415430bd69a055d32",
"target": {
"file": "ext/nokogiri/xml_node.c",
"function": "output_node"
}
},
{
"deprecated": false,
"digest": {
"function_hash": "159848856105768869530107496787884762821",
"length": 195
},
"id": "CVE-2026-126063-1cc22502",
"signature_type": "Function",
"signature_version": "v1",
"source": "https://github.com/sparklemotion/nokogiri/commit/c6c0bffbdcd194694995acafeeed27326b0805f8",
"target": {
"file": "ext/nokogiri/xml_node.c",
"function": "html_standard_serialize"
}
},
{
"deprecated": false,
"digest": {
"function_hash": "83021993379884352476903377296156328328",
"length": 4390
},
"id": "CVE-2026-126063-26d0b8b0",
"signature_type": "Function",
"signature_version": "v1",
"source": "https://github.com/sparklemotion/nokogiri/commit/3e84df6ff7ab4d78f446e3a415430bd69a055d32",
"target": {
"file": "ext/nokogiri/xml_node.c",
"function": "noko_init_xml_node"
}
},
{
"deprecated": false,
"digest": {
"line_hashes": [
"11693163192448611991042378342240132690",
"89041859772766954947148494679388702963",
"295192232860958980786523460996225178353",
"256494659371348053701271100030456266769",
"270014737149365002223318104537274380780",
"218315041435234843318004543082947533244",
"131326496776528440911157981985629524729",
"26092873869048874882924513659606275670",
"300504345322010833015709153721645957257",
"163370825284392916688543610070682420392",
"35739913377206923218347398888739218474",
"129955388822892213697744741780328708129",
"188381523528543774536559967530804215249",
"226634114388115689847223771276107324734",
"38058942764674811018643056933754658234",
"91552981529048922250522238422806142380",
"122592710719091387397185824737533316671",
"183531412076018976864109899699626359522",
"81816817494168431015977779628317671889",
"128025264128006035077690008249537403910",
"39258553681613739327739476976038125960",
"5886546638589370610715382680751696761",
"318716547430503747026716235962276901041",
"302833681975233087645957988307090191155",
"10345641762687579833498547942546550166",
"160876813415918354016619698478714576730",
"20935085275763488060487716304013106168",
"65137160023608448774892259950521648854",
"280216121776892490624593653836604940039",
"310617565468045732084641717546032231042",
"283580679903162083864446635334060015666",
"8058196935012925980430852755350782092",
"112928764764784386098946840835194511516",
"14499439282830243281298185212083918855",
"202549188816957630871640934846207341662",
"68224721194871851398584308393765004164",
"261983712832784383927500092015801131424",
"24218301981902983036005634908730675482",
"61033267088569843623002136854846580022",
"97251221361122871127140056894812277319"
],
"threshold": 0.9
},
"id": "CVE-2026-126063-3b9c50bc",
"signature_type": "Line",
"signature_version": "v1",
"source": "https://github.com/sparklemotion/nokogiri/commit/c6c0bffbdcd194694995acafeeed27326b0805f8",
"target": {
"file": "ext/nokogiri/xml_node.c"
}
},
{
"deprecated": false,
"digest": {
"function_hash": "83021993379884352476903377296156328328",
"length": 4390
},
"id": "CVE-2026-126063-3bfd38a8",
"signature_type": "Function",
"signature_version": "v1",
"source": "https://github.com/sparklemotion/nokogiri/commit/c6c0bffbdcd194694995acafeeed27326b0805f8",
"target": {
"file": "ext/nokogiri/xml_node.c",
"function": "noko_init_xml_node"
}
},
{
"deprecated": false,
"digest": {
"function_hash": "203224288994697015179501685702418264524",
"length": 2671
},
"id": "CVE-2026-126063-66e21323",
"signature_type": "Function",
"signature_version": "v1",
"source": "https://github.com/sparklemotion/nokogiri/commit/c6c0bffbdcd194694995acafeeed27326b0805f8",
"target": {
"file": "ext/nokogiri/xml_node.c",
"function": "output_node"
}
},
{
"deprecated": false,
"digest": {
"line_hashes": [
"11693163192448611991042378342240132690",
"89041859772766954947148494679388702963",
"295192232860958980786523460996225178353",
"256494659371348053701271100030456266769",
"270014737149365002223318104537274380780",
"218315041435234843318004543082947533244",
"131326496776528440911157981985629524729",
"26092873869048874882924513659606275670",
"300504345322010833015709153721645957257",
"163370825284392916688543610070682420392",
"35739913377206923218347398888739218474",
"129955388822892213697744741780328708129",
"188381523528543774536559967530804215249",
"226634114388115689847223771276107324734",
"38058942764674811018643056933754658234",
"91552981529048922250522238422806142380",
"122592710719091387397185824737533316671",
"183531412076018976864109899699626359522",
"81816817494168431015977779628317671889",
"128025264128006035077690008249537403910",
"39258553681613739327739476976038125960",
"5886546638589370610715382680751696761",
"318716547430503747026716235962276901041",
"302833681975233087645957988307090191155",
"10345641762687579833498547942546550166",
"160876813415918354016619698478714576730",
"20935085275763488060487716304013106168",
"65137160023608448774892259950521648854",
"280216121776892490624593653836604940039",
"310617565468045732084641717546032231042",
"283580679903162083864446635334060015666",
"8058196935012925980430852755350782092",
"112928764764784386098946840835194511516",
"14499439282830243281298185212083918855",
"202549188816957630871640934846207341662",
"68224721194871851398584308393765004164",
"261983712832784383927500092015801131424",
"24218301981902983036005634908730675482",
"61033267088569843623002136854846580022",
"97251221361122871127140056894812277319"
],
"threshold": 0.9
},
"id": "CVE-2026-126063-787337cc",
"signature_type": "Line",
"signature_version": "v1",
"source": "https://github.com/sparklemotion/nokogiri/commit/3e84df6ff7ab4d78f446e3a415430bd69a055d32",
"target": {
"file": "ext/nokogiri/xml_node.c"
}
}
]
"2026-11-15T07:04:30Z"