Nokogiri is an open source XML and HTML library for the Ruby programming language. Nokogiri 1.13.8 and 1.13.9 fail to check the return value from xmlTextReaderExpand in the method Nokogiri::XML::Reader#attribute_hash. This can lead to a null pointer exception when invalid markup is being parsed. For applications using XML::Reader to parse untrusted inputs, this may potentially be a vector for a denial of service attack. Users are advised to upgrade to Nokogiri >= 1.13.10. Users may be able to search their code for calls to either XML::Reader#attributes or XML::Reader#attribute_hash to determine if they are affected.
{
"cna_assigner": "GitHub_M",
"cwe_ids": [
"CWE-252",
"CWE-476"
],
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/23xxx/CVE-2022-23476.json"
}{
"extracted_events": [
{
"range": [
{
"introduced": "1.13.8"
},
{
"fixed": "1.13.10"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StringRangeExpression"
},
{
"range": [
{
"fixed": "85410e38410f670cbbc8c5b00d07b843caee88ce"
}
],
"source": "REFERENCES_COMMIT"
},
{
"range": [
{
"fixed": "9fe0761c47c0d4270d1a5220cfd25de080350d50"
}
],
"source": "REFERENCES_COMMIT"
}
]
}
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-23476.json"
[
{
"deprecated": false,
"digest": {
"line_hashes": [
"338330347538303270265674463851703969081",
"20281948773295152668299871912509712901",
"51839228827875473201713963574615492252",
"31653400320971216959746279358733104353"
],
"threshold": 0.9
},
"id": "CVE-2022-23476-b572b4da",
"signature_type": "Line",
"signature_version": "v1",
"source": "https://github.com/sparklemotion/nokogiri/commit/9fe0761c47c0d4270d1a5220cfd25de080350d50",
"target": {
"file": "ext/nokogiri/xml_reader.c"
}
},
{
"deprecated": false,
"digest": {
"function_hash": "34446822197912599254216583849376734517",
"length": 493
},
"id": "CVE-2022-23476-dd36cfc2",
"signature_type": "Function",
"signature_version": "v1",
"source": "https://github.com/sparklemotion/nokogiri/commit/9fe0761c47c0d4270d1a5220cfd25de080350d50",
"target": {
"file": "ext/nokogiri/xml_reader.c",
"function": "rb_xml_reader_attribute_hash"
}
}
]
"2026-10-22T07:19:14Z"