CVE-2022-23476 | Unchecked return value from xmlTextReaderExpand in Nokogiri

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.

Published: 2022-12-08 Last update: 2024-11-21 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2022-23476 is rated Moderate Risk (47.2/100): CVSS High severity, with low exploitation likelihood (EPSS 0.26%). Mandatory action: Review affected assets and schedule remediation.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Exploit prediction scoring system (EPSS) score for CVE-2022-23476

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-05-17 0.23% 0.26% +0.03%
2 2026-03-06 0.31% 0.23% -0.08%
3 2026-03-04 0.31%

Full EPSS history (41 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2022-23476

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
7.5 3.1 HIGH
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:N)
Doesn’t really leak secrets in a meaningful way.
Integrity (I:N)
Data isn’t meaningfully altered or forged.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
3.9 3.6 [email protected]
7.5 3.1 HIGH
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:N)
Doesn’t really leak secrets in a meaningful way.
Integrity (I:N)
Data isn’t meaningfully altered or forged.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
3.9 3.6 [email protected]

Weakness enumeration for CVE-2022-23476

GitHub Security Advisory for CVE-2022-23476

GHSA-qv4q-mr5r-qprj · Severity: high · Ecosystem: rubygems — Unchecked return value from xmlTextReaderExpand

OS Trackers for CVE-2022-23476

vendor priority summary link
alpine high CVE-2022-23476: 1 source package rows (ruby-nokogiri); 7 state rows across 7 repos (3.17-community, 3.18-community, 3.19-community, 3.20-community, 3.21-community, 3.22-community, edge-community); fixed 7, open 0. https://security.alpinelinux.org/vuln/CVE-2022-23476
debian unimportant CVE-2022-23476 unimportant priority: Debian including 1 source packages (ruby-nokogiri), 5 status rows across 5 suites (bookworm, bullseye, forky, sid, trixie): resolved 5. https://security-tracker.debian.org/tracker/CVE-2022-23476
gentoo normal CVE-2022-23476: 1 GLSA(s) (202408-13), 1 atom(s) (dev-ruby/nokogiri); latest impact normal. https://bugs.gentoo.org/buglist.cgi?quicksearch=CVE-2022-23476
redhat medium https://access.redhat.com/security/cve/CVE-2022-23476
ubuntu medium CVE-2022-23476 medium priority: Ubuntu including 1 source packages (ruby-nokogiri), 12 status rows across 12 suites (bionic, focal, jammy, kinetic, lunar, mantic, noble, oracular, plucky, trusty, upstream, xenial): not-affected 8, ignored 3, released 1. https://ubuntu.com/security/CVE-2022-23476

Affected software / configurations for CVE-2022-23476

Vendor Product Version Raw CPE
nokogiri nokogiri 1.13.8 cpe:2.3:a:nokogiri:nokogiri:1.13.8:*:*:*:*:ruby:*:*
nokogiri nokogiri 1.13.9 cpe:2.3:a:nokogiri:nokogiri:1.13.9:*:*:*:*:ruby:*:*

References for CVE-2022-23476

cvelogic Threat Intelligence