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.
{ "vanir_signatures": [ { "target": { "file": "ext/nokogiri/xml_reader.c" }, "id": "CVE-2022-23476-b572b4da", "signature_version": "v1", "digest": { "line_hashes": [ "338330347538303270265674463851703969081", "20281948773295152668299871912509712901", "51839228827875473201713963574615492252", "31653400320971216959746279358733104353" ], "threshold": 0.9 }, "source": "https://github.com/sparklemotion/nokogiri/commit/9fe0761c47c0d4270d1a5220cfd25de080350d50", "signature_type": "Line", "deprecated": false }, { "target": { "function": "rb_xml_reader_attribute_hash", "file": "ext/nokogiri/xml_reader.c" }, "id": "CVE-2022-23476-dd36cfc2", "signature_version": "v1", "digest": { "length": 493.0, "function_hash": "34446822197912599254216583849376734517" }, "source": "https://github.com/sparklemotion/nokogiri/commit/9fe0761c47c0d4270d1a5220cfd25de080350d50", "signature_type": "Function", "deprecated": false } ] }