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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- None
- Integrity
- None
- Availability
- High
Exploit likelihood
What each source reports
CVE List Score used
7.5
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.
- Record
CVE-2022-23476- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-252, CWE-476
- Updated
- 2026-11-02
EUVDEUVD-2022-7725
7.5
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.
- Record
EUVD-2022-7725- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-qv4q-mr5r-qprj
7.5
Unchecked return value from xmlTextReaderExpand
Summary
Nokogiri 1.13.8, 1.13.9 fails 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.
Mitigation
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.
Severity
The Nokogiri maintainers have evaluated this as High Severity 7.5 (CVSS3.1).
References
Credit
This vulnerability was responsibly reported by @davidwilemski.
- Record
GHSA-qv4q-mr5r-qprj- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-252, CWE-476
- Updated
- 2026-11-02
NVD
7.5
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.
- Record
CVE-2022-23476- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-252, CWE-476
- Updated
- 2026-11-02
OSVALPINE-CVE-2022-23476
7.5
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.
- Record
ALPINE-CVE-2022-23476- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-03
OSVBELL-CVE-2022-23476
7.5
CVE-2022-23476 does not affect BellSoft software
- Record
BELL-CVE-2022-23476- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
Show 8 moreShow less
OSV
7.5
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.
- Record
CVE-2022-23476- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-252, CWE-476
- Updated
- 2026-11-02
OSVDEBIAN-CVE-2022-23476
7.5
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.
- Record
DEBIAN-CVE-2022-23476- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-03
OSVGHSA-qv4q-mr5r-qprj
7.5
Unchecked return value from xmlTextReaderExpand
Summary
Nokogiri 1.13.8, 1.13.9 fails 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.
Mitigation
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.
Severity
The Nokogiri maintainers have evaluated this as High Severity 7.5 (CVSS3.1).
References
Credit
This vulnerability was responsibly reported by @davidwilemski.
- Record
GHSA-qv4q-mr5r-qprj- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-252, CWE-476
- Updated
- 2026-11-02
OSVUBUNTU-CVE-2022-23476
7.5
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.
- Record
UBUNTU-CVE-2022-23476- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVopenSUSE-SU-2024:13440-1 No score
ruby3.2-rubygem-nokogiri-1.15.4-1.1 on GA media
These are all security issues fixed in the ruby3.2-rubygem-nokogiri-1.15.4-1.1 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2024:13440-1- Updated
- 2026-11-02
OSVopenSUSE-SU-2024:14174-1 No score
ruby3.3-rubygem-nokogiri-1.15.5-1.5 on GA media
These are all security issues fixed in the ruby3.3-rubygem-nokogiri-1.15.5-1.5 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2024:14174-1- Updated
- 2026-11-02
OSVopenSUSE-SU-2025:14697-1 No score
ruby3.4-rubygem-nokogiri-1.18.2-1.1 on GA media
These are all security issues fixed in the ruby3.4-rubygem-nokogiri-1.18.2-1.1 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2025:14697-1- Updated
- 2026-11-02
OSVopenSUSE-SU-2026:10356-1 No score
ruby4.0-rubygem-nokogiri-1.18.9-1.4 on GA media
These are all security issues fixed in the ruby4.0-rubygem-nokogiri-1.18.9-1.4 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2026:10356-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
nokogiriRubyGems |
1.13.8 up to 1.13.10 | 1.13.10 |
ruby-nokogiriAlpine:v3.16 |
before 1.13.10-r0 | 1.13.10-r0 |
ruby-nokogiriAlpine:v3.17 |
before 1.13.10-r0 | 1.13.10-r0 |
ruby-nokogiriAlpine:v3.18 |
before 1.13.10-r0 | 1.13.10-r0 |
ruby-nokogiriAlpine:v3.19 |
before 1.13.10-r0 | 1.13.10-r0 |
ruby-nokogiriAlpine:v3.20 |
before 1.13.10-r0 | 1.13.10-r0 |
ruby-nokogiriAlpine:v3.21 |
before 1.13.10-r0 | 1.13.10-r0 |
ruby-nokogiriAlpine:v3.22 |
before 1.13.10-r0 | 1.13.10-r0 |
ruby-nokogiriAlpine:v3.23 |
before 1.13.10-r0 | 1.13.10-r0 |
ruby-nokogiriAlpine:v3.24 |
before 1.13.10-r0 | 1.13.10-r0 |
Show 8 moreShow less
| Package | Affected | Fixed |
|---|---|---|
ruby-nokogiriDebian:12 |
before 1.13.10+dfsg-1 | 1.13.10+dfsg-1 |
ruby-nokogiriDebian:13 |
before 1.13.10+dfsg-1 | 1.13.10+dfsg-1 |
ruby-nokogiriDebian:14 |
before 1.13.10+dfsg-1 | 1.13.10+dfsg-1 |
nokogiriRubyGems |
1.13.8 up to 1.13.10, plus listed versions 1.13.9 |
1.13.10 |
ruby3.2-rubygem-nokogiriopenSUSE:Tumbleweed |
before 1.15.4-1.1 | 1.15.4-1.1 |
rubygem-nokogiriopenSUSE:Tumbleweed |
before 1.15.5-1.5 | 1.15.5-1.5 |
rubygem-nokogiriopenSUSE:Tumbleweed |
before 1.18.2-1.1 | 1.18.2-1.1 |
rubygem-nokogiriopenSUSE:Tumbleweed |
before 1.18.9-1.4 | 1.18.9-1.4 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, aliases, references | OSV | |
| affected | ||
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2022-23476 is a high vulnerability (CVSS 7.5) in Nokogiri, published December 8, 2022. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.82%, the 78th percentile. Fixed in nokogiri 1.13.10.
References
github.com/sparklemotion/nokogiri/security/advisories/GHSA-qv4q-mr5r-qprj
github.com/sparklemotion/nokogiri/commit/85410e38410f670cbbc8c5b00d07b843caee88ce
github.com/sparklemotion/nokogiri/commit/9fe0761c47c0d4270d1a5220cfd25de080350d50
nvd.nist.gov/vuln/detail/CVE-2022-23476
github.com/rubysec/ruby-advisory-db/blob/master/gems/nokogiri/CVE-2022-23476.yml
github.com/advisories/GHSA-qv4q-mr5r-qprj
Show 52 moreShow less
security.alpinelinux.org/vuln/CVE-2022-23476
docs.bell-sw.com/security/cves/CVE-2022-23476
github.com/CVEProject/cvelistV5/tree/main/cves/2022/23xxx/CVE-2022-23476.json
security-tracker.debian.org/tracker/CVE-2022-23476
github.com/sparklemotion/nokogiri
ubuntu.com/security/CVE-2022-23476
cve.org/CVERecord?id=CVE-2022-23476
suse.com/security/cve/CVE-2022-23476
suse.com/security/cve/CVE-2022-34169
suse.com/security/cve/CVE-2023-29469
suse.com/security/cve/CVE-2013-2877
suse.com/security/cve/CVE-2014-0191
suse.com/security/cve/CVE-2015-1819
suse.com/security/cve/CVE-2015-5312
suse.com/security/cve/CVE-2015-7497
suse.com/security/cve/CVE-2015-7498
suse.com/security/cve/CVE-2015-7499
suse.com/security/cve/CVE-2015-7500
suse.com/security/cve/CVE-2015-7941
suse.com/security/cve/CVE-2015-7942
suse.com/security/cve/CVE-2015-7995
suse.com/security/cve/CVE-2015-8035
suse.com/security/cve/CVE-2015-8241
suse.com/security/cve/CVE-2015-8242
suse.com/security/cve/CVE-2015-8317
suse.com/security/cve/CVE-2016-4658
suse.com/security/cve/CVE-2016-4738
suse.com/security/cve/CVE-2016-5131
suse.com/security/cve/CVE-2017-15412
suse.com/security/cve/CVE-2017-5029
suse.com/security/cve/CVE-2018-14404
suse.com/security/cve/CVE-2018-25032
suse.com/security/cve/CVE-2018-8048
suse.com/security/cve/CVE-2019-11068
suse.com/security/cve/CVE-2019-20388
suse.com/security/cve/CVE-2019-5477
suse.com/security/cve/CVE-2020-24977
suse.com/security/cve/CVE-2020-7595
suse.com/security/cve/CVE-2021-30560
suse.com/security/cve/CVE-2021-3516
suse.com/security/cve/CVE-2021-3517
suse.com/security/cve/CVE-2021-3518
suse.com/security/cve/CVE-2021-3537
suse.com/security/cve/CVE-2021-3541
suse.com/security/cve/CVE-2021-41098
suse.com/security/cve/CVE-2022-23308
suse.com/security/cve/CVE-2022-23437
suse.com/security/cve/CVE-2022-24836
suse.com/security/cve/CVE-2022-24839
suse.com/security/cve/CVE-2022-29181
suse.com/security/cve/CVE-2022-29824
lists.opensuse.org/archives/list/[email protected]/thread/U5YNW74OL2W7SH2XTAVN5TODNFIVFL3Y