Unchecked return value from xmlTextReaderExpand in Nokogiri
Description
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.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
nokogiriRubyGems | >= 1.13.8, < 1.13.10 | 1.13.10 |
Affected products
4- ghsa-coords3 versionspkg:gem/nokogiripkg:rpm/opensuse/ruby3.2-rubygem-nokogiri&distro=openSUSE%20Tumbleweedpkg:rpm/opensuse/rubygem-nokogiri&distro=openSUSE%20Tumbleweed
>= 1.13.8, < 1.13.10+ 2 more
- (no CPE)range: >= 1.13.8, < 1.13.10
- (no CPE)range: < 1.15.4-1.1
- (no CPE)range: < 1.15.5-1.5
- Range: >= 1.13.8, < 1.13.10
Patches
Vulnerability mechanics
References
6- github.com/advisories/GHSA-qv4q-mr5r-qprjghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2022-23476ghsaADVISORY
- github.com/rubysec/ruby-advisory-db/blob/master/gems/nokogiri/CVE-2022-23476.ymlghsaWEB
- github.com/sparklemotion/nokogiri/commit/85410e38410f670cbbc8c5b00d07b843caee88ceghsax_refsource_MISCWEB
- github.com/sparklemotion/nokogiri/commit/9fe0761c47c0d4270d1a5220cfd25de080350d50ghsax_refsource_MISCWEB
- github.com/sparklemotion/nokogiri/security/advisories/GHSA-qv4q-mr5r-qprjghsax_refsource_CONFIRMWEB
News mentions
0No linked articles in our index yet.