Live threats

All CVEs / Nokogiri

CVE-2022-23476Nokogiri

High 7.5 No auth needed

Priority
60
CVSS 3.1
7.5
EPSS
2.1%
probability of exploitation in 30 days · percentile 82
Auth required
No
Published
Dec 8, 2022
Updated
Jun 17, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-252, CWE-476
SSVC (CISA)
Exploitation: none · Automatable: yes · Technical impact: partial
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

What happens

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.

Original NVD text.

What to do

  1. Apply the vendor's security update for Nokogiri.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
RubyGems nokogiri ≥ 1.13.8 < 1.13.10 1.13.10 gem "nokogiri", ">= 1.13.10"

Per OSV / GitHub Advisories (GHSA-qv4q-mr5r-qprj). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
nokogirinokogiri1.13.8
nokogirinokogiri1.13.9

Official advisories

Vendor, CERT and distribution advisories that name this CVE. Original titles.

Official sources

References

Links published by the sources. Open them with care.