Nokogiri is an open source XML and HTML library for the Ruby programming language. Prior to 1.19.5, the CRuby native extension can leave Ruby wrappers pointing to freed memory when Nokogiri::XML::Node#[]= or Nokogiri::XML::Node#lang= replaces an existing attribute value after code has accessed the attribute's child nodes. Replacing the value frees native child nodes while their wrappers remain reachable, and later use of those wrappers can cause an invalid read or process segfault. JRuby is not affected. This issue is fixed in version 1.19.5.
{
"cna_assigner": "GitHub_M",
"cwe_ids": [
"CWE-416"
],
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/126xxx/CVE-2026-126064.json"
}{
"extracted_events": [
{
"range": [
{
"introduced": "0"
},
{
"fixed": "1.19.5"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StringRangeExpression"
},
{
"range": [
{
"fixed": "b15b518db9fd15fd6b046f73d1439c282e5cc425"
}
],
"source": "REFERENCES_COMMIT"
},
{
"range": [
{
"fixed": "feaed3c8c9bd9d81d064d4ca09b16044cd705d6f"
}
],
"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-126064.json"
[
{
"deprecated": false,
"digest": {
"line_hashes": [
"329116804269084993714489021959617534366",
"10665907067385703663769956586580978131",
"134812508711210885486693546584642620676",
"20381425423044050306088530296539562877",
"134457471830423655074210106858204748570",
"36622836451855736997213296444458671068",
"144430016764396361434705084872384104791",
"268988912638822679529523639856674935434",
"152603131634523544213294050063299712497",
"288233812579710320950924674263781405848",
"216169459123383918151124780625084715068",
"318247276293638755266200135834695563732",
"44746090123199660023167899881278503869",
"178687873462930808034311631644840893336",
"73714882832018562849262239387733878012",
"104913182953523345898786919903959146845",
"192864377878061541207209652257262730700",
"253091471589412960543448590145047417172",
"333216520998683375947889663117427627398",
"60271165438403892780290973390156821580",
"143156081696064787073732185231326375646",
"338458117370049184364170742554539055683",
"251980397564018939110382001322371392767",
"266186097641940771996228689057420141892",
"336740353573011585655824815735450722080",
"199290589813375123519241020941445210301"
],
"threshold": 0.9
},
"id": "CVE-2026-126064-161c3256",
"signature_type": "Line",
"signature_version": "v1",
"source": "https://github.com/sparklemotion/nokogiri/commit/b15b518db9fd15fd6b046f73d1439c282e5cc425",
"target": {
"file": "ext/nokogiri/xml_node.c"
}
},
{
"deprecated": false,
"digest": {
"line_hashes": [
"329116804269084993714489021959617534366",
"10665907067385703663769956586580978131",
"134812508711210885486693546584642620676",
"20381425423044050306088530296539562877",
"134457471830423655074210106858204748570",
"36622836451855736997213296444458671068",
"144430016764396361434705084872384104791",
"268988912638822679529523639856674935434",
"152603131634523544213294050063299712497",
"288233812579710320950924674263781405848",
"216169459123383918151124780625084715068",
"318247276293638755266200135834695563732",
"44746090123199660023167899881278503869",
"178687873462930808034311631644840893336",
"73714882832018562849262239387733878012",
"104913182953523345898786919903959146845",
"192864377878061541207209652257262730700",
"253091471589412960543448590145047417172",
"333216520998683375947889663117427627398",
"60271165438403892780290973390156821580",
"143156081696064787073732185231326375646",
"338458117370049184364170742554539055683",
"251980397564018939110382001322371392767",
"266186097641940771996228689057420141892",
"336740353573011585655824815735450722080",
"199290589813375123519241020941445210301"
],
"threshold": 0.9
},
"id": "CVE-2026-126064-18700355",
"signature_type": "Line",
"signature_version": "v1",
"source": "https://github.com/sparklemotion/nokogiri/commit/feaed3c8c9bd9d81d064d4ca09b16044cd705d6f",
"target": {
"file": "ext/nokogiri/xml_node.c"
}
},
{
"deprecated": false,
"digest": {
"function_hash": "282653681586140266861005422985172242471",
"length": 514
},
"id": "CVE-2026-126064-60d2a016",
"signature_type": "Function",
"signature_version": "v1",
"source": "https://github.com/sparklemotion/nokogiri/commit/b15b518db9fd15fd6b046f73d1439c282e5cc425",
"target": {
"file": "ext/nokogiri/xml_node.c",
"function": "set"
}
},
{
"deprecated": false,
"digest": {
"function_hash": "155793928786924279792997164897199354965",
"length": 196
},
"id": "CVE-2026-126064-9bcca1d6",
"signature_type": "Function",
"signature_version": "v1",
"source": "https://github.com/sparklemotion/nokogiri/commit/b15b518db9fd15fd6b046f73d1439c282e5cc425",
"target": {
"file": "ext/nokogiri/xml_node.c",
"function": "set_lang"
}
},
{
"deprecated": false,
"digest": {
"function_hash": "155793928786924279792997164897199354965",
"length": 196
},
"id": "CVE-2026-126064-9eaf49f3",
"signature_type": "Function",
"signature_version": "v1",
"source": "https://github.com/sparklemotion/nokogiri/commit/feaed3c8c9bd9d81d064d4ca09b16044cd705d6f",
"target": {
"file": "ext/nokogiri/xml_node.c",
"function": "set_lang"
}
},
{
"deprecated": false,
"digest": {
"function_hash": "282653681586140266861005422985172242471",
"length": 514
},
"id": "CVE-2026-126064-c5a8f6d0",
"signature_type": "Function",
"signature_version": "v1",
"source": "https://github.com/sparklemotion/nokogiri/commit/feaed3c8c9bd9d81d064d4ca09b16044cd705d6f",
"target": {
"file": "ext/nokogiri/xml_node.c",
"function": "set"
}
}
]
"2026-11-14T07:04:10Z"