{"id":"CVE-2022-23476","summary":"Unchecked return value from xmlTextReaderExpand in Nokogiri","details":"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 `\u003e= 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.","aliases":["GHSA-qv4q-mr5r-qprj"],"modified":"2026-08-12T03:51:20.858513895Z","published":"2022-12-08T03:03:24.572Z","related":["openSUSE-SU-2024:13440-1","openSUSE-SU-2024:14174-1","openSUSE-SU-2025:14697-1","openSUSE-SU-2026:10356-1"],"database_specific":{"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"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/23xxx/CVE-2022-23476.json"},{"type":"ADVISORY","url":"https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-qv4q-mr5r-qprj"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-23476"},{"type":"FIX","url":"https://github.com/sparklemotion/nokogiri/commit/85410e38410f670cbbc8c5b00d07b843caee88ce"},{"type":"FIX","url":"https://github.com/sparklemotion/nokogiri/commit/9fe0761c47c0d4270d1a5220cfd25de080350d50"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/sparklemotion/nokogiri","events":[{"introduced":"21b4ac5862dba11c89255e2f0a8082bf63eac53a"},{"fixed":"4c80121dc309e67fa3d9f66a00516bad39b42c31"}],"database_specific":{"source":"AFFECTED_FIELD","extracted_events":[{"introduced":"1.13.8"},{"fixed":"1.13.10"}]}}],"versions":["1.13.8","1.13.9","v1.13.9","v1.13.8"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-23476.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"}]}