CVE-2022-23476: nokogiri Unchecked Return Value
Vulnerability summary
CVE-2022-23476 is a high (CVSS 7.5) Unchecked Return Value vulnerability in nokogiri. EPSS estimates a 1.82% chance of exploitation in the next 30 days, higher than 78.4% of scored vulnerabilities.
Advisory lineage
Upstream 0 · Downstream 4 · Related 4Timeline
- 08-12-2022PublishedVulnerability first disclosed.
- 23-04-2025Last modifiedVulnerability information updated.
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.
CVSS metrics
5 scores · 5 sources · 1 version- OSV · UbuntuEcosystem advisory · calculated7.5HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- OSV · DebianEcosystem advisory · calculated7.5HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- OSV · RubygemsEcosystem advisory · calculated7.5HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- NVDNIST7.5HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS trend
Probability
1.82%
Chance of exploitation in the next 30 days
Percentile
78%
Versus all other CVEs
30-day change
+0.07 pp
From 1.76% on 19-09-2026
Known exploited
Compare KEV catalogsNot in any of the 3 tracked catalogs.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Debian1 product
- ruby-nokogiri< 1.13.10+dfsg-1
Nokogiri1 product
- nokogiri1.13.8 | 1.13.9
RubyGems1 product
- nokogiri≥ 1.13.8, < 1.13.10
Sparklemotion1 product
- nokogiri≥ 1.13.8, < 1.13.10
Ubuntu1 product
- ruby-nokogiriAll versions (No fix recorded)
5 vendors · 5 products
References
9 links- github.com/sparklemotion/nokogiri/security/advisories/GHSA-qv4q-mr5r-qprjX Refsource CONFIRMREPORTWEBThird Party Advisory
- github.com/sparklemotion/nokogiri/commit/85410e38410f670cbbc8c5b00d07b843caee88ceX Refsource MISCREPORTWEBPatchThird Party Advisory
- github.com/sparklemotion/nokogiri/commit/9fe0761c47c0d4270d1a5220cfd25de080350d50X Refsource MISCREPORTWEBPatchThird Party Advisory