CVE-2022-23476
CVE-2022-23476 is a high-severity vulnerability in Nokogiri with a CVSS 3.x base score of 7.5. It is not currently listed as actively exploited by CISA, and its EPSS exploit-prediction score is low. The underlying weakness is classified as CWE-252.
Key facts
- Severity: High (CVSS 3.x base score 7.5)
- EPSS exploit prediction: 2% (74th percentile)
- Actively exploited: Not listed in CISA KEV
- Weakness: CWE-252
- Affected product: Nokogiri
- Published:
- Last modified:
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.
Frequently asked questions
- What is CVE-2022-23476?
- 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.
- How severe is CVE-2022-23476?
- CVE-2022-23476 has a CVSS 3.x base score of 7.5, rated high severity. It is exploitable over network with low attack complexity, requires no privileges and no user interaction. Impact on confidentiality is none, integrity none, and availability high.
- Is CVE-2022-23476 being actively exploited?
- It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 2% (74th percentile), an estimate of the probability of exploitation in the next 30 days.
- What products are affected by CVE-2022-23476?
- CVE-2022-23476 primarily affects Nokogiri. In total, 2 product configurations (CPEs) are listed as vulnerable; see the affected-products list for the exact versions.
- How do I fix CVE-2022-23476?
- Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround. Given its high severity, prioritise patching exposed systems.
- When was CVE-2022-23476 published?
- CVE-2022-23476 was published on 2022-12-08 and last updated on 2026-06-17.
References
- https://github.com/sparklemotion/nokogiri/commit/85410e38410f670cbbc8c5b00d07b843caee88ce
- https://github.com/sparklemotion/nokogiri/commit/9fe0761c47c0d4270d1a5220cfd25de080350d50
- https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-qv4q-mr5r-qprj
Affected products (2)
- cpe:2.3:a:nokogiri:nokogiri:1.13.8:*:*:*:*:ruby:*:*
- cpe:2.3:a:nokogiri:nokogiri:1.13.9:*:*:*:*:ruby:*:*
More vulnerabilities in Nokogiri
- CVE-2019-5477 — Critical (CVSS 9.8): A command injection vulnerability in Nokogiri v1.10.3 and earlier allows commands to be executed in a subprocess via…
- CVE-2026-57236 — High (CVSS 8.2): Nokogiri is an open source XML and HTML library for the Ruby programming language. Prior to 1.19.4, calling…
- CVE-2026-57235 — High (CVSS 8.2): Nokogiri is an open source XML and HTML library for the Ruby programming language. Prior to 1.19.4,…
- CVE-2022-29181 — High (CVSS 8.2): Nokogiri is an open source XML and HTML library for Ruby. Nokogiri prior to version 1.13.6 does not type-check all…
- CVE-2026-57435 — High (CVSS 7.5): Nokogiri is an open source XML and HTML library for the Ruby programming language. Prior to 1.19.4, Nokogiri’s CRuby…
- CVE-2026-57434 — High (CVSS 7.5): Nokogiri is an open source XML and HTML library for the Ruby programming language. Prior to 1.19.4, Nokogiri contains a…
Other CWE-252 vulnerabilities
- CVE-2025-66565 — Critical (CVSS 9.8): Fiber Utils is a collection of common functions created for Fiber. In versions 2.0.0-rc.3 and below, when the system's…
- CVE-2021-38171 — Critical (CVSS 9.8): adts_decode_extradata in libavformat/adtsenc.c in FFmpeg 4.4 does not check the init_get_bits return value, which is a…
- CVE-2021-26955 — Critical (CVSS 9.8): An issue was discovered in the xcb crate through 2021-02-04 for Rust. It has a soundness violation because…
- CVE-1999-0199 — Critical (CVSS 9.8): manual/search.texi in the GNU C Library (aka glibc) before 2.2 lacks a statement about the unspecified tdelete return…
- CVE-2019-15900 — Critical (CVSS 9.8): An issue was discovered in slicer69 doas before 6.2 on certain platforms other than OpenBSD. On platforms without…
- CVE-2010-0211 — Critical (CVSS 9.8): The slap_modrdn2mods function in modrdn.c in OpenLDAP 2.4.22 does not check the return value of a call to the…