{"id":"CVE-2022-23476","published":"2022-12-08T03:03:24Z","modified":"2025-04-23T16:31:18Z","title":"Unchecked return value from xmlTextReaderExpand in Nokogiri","vendor":"sparklemotion","product":"nokogiri","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.5,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01832,"percentile":0.7942,"provenance":"source"},"cwes":[{"id":"CWE-252","name":"Unchecked Return Value"},{"id":"CWE-476","name":"NULL Pointer Dereference"}],"references":[{"url":"https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-qv4q-mr5r-qprj","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/sparklemotion/nokogiri/commit/85410e38410f670cbbc8c5b00d07b843caee88ce","tags":["x_refsource_MISC"]},{"url":"https://github.com/sparklemotion/nokogiri/commit/9fe0761c47c0d4270d1a5220cfd25de080350d50","tags":["x_refsource_MISC"]}],"priority":{"score":21.1,"factors":[{"name":"EPSS percentile","points":15.88},{"name":"CVSS severity","points":5.25}]},"vendorSlug":"sparklemotion","affectedVersions":[{"vendor":"sparklemotion","product":"nokogiri","versions":[">= 1.13.8, < 1.13.10"]}],"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"partial","timestamp":"2025-04-23T15:48:08.798198Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"RubyGems","package":"nokogiri","vulnerableRanges":[">=1.13.8, <1.13.10"],"patched":["1.13.10"],"from":["GHSA-qv4q-mr5r-qprj"],"provenance":"source"}],"summary":{"text":"The Nokogiri Ruby XML/HTML library, in versions 1.13.8 and 1.13.9, fails to check the return value of xmlTextReaderExpand in Nokogiri::XML::Reader#attribute_hash, which can cause a null pointer dereference when invalid markup is parsed. An attacker with network access can exploit this without authentication or user interaction by supplying crafted XML to an application that uses XML::Reader on untrusted input, causing a denial of service.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T07:11:19Z"},"euvd":{"id":"EUVD-2022-7725","exploited":false,"provenance":"source"}}