CVE-2022-29181Nokogiri
High 8.2 No auth needed
Follow: this CVE · Nokogiri · Nokogiri We alert you by email or Slack (account required).
- Priority
- 64
- CVSS 3.1
- 8.2
- EPSS
- 2.6% probability of exploitation in 30 days · percentile 86
- Auth required
- No
- Published
- May 20, 2022
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- SSVC (CISA)
- Exploitation: proof of concept · Automatable: yes · Technical impact: partial
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H
What happens
Nokogiri is an open source XML and HTML library for Ruby. Nokogiri prior to version 1.13.6 does not type-check all inputs into the XML and HTML4 SAX parsers, allowing specially crafted untrusted inputs to cause illegal memory access errors (segfault) or reads from unrelated memory. Version 1.13.6 contains a patch for this issue. As a workaround, ensure the untrusted input is a `String` by calling `#to_s` or equivalent.
What to do
- Apply the vendor's security update for Nokogiri.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| RubyGems | nokogiri |
< 1.13.6 |
1.13.6 |
gem "nokogiri", ">= 1.13.6" |
Per OSV / GitHub Advisories (GHSA-xh29-r2w5-wx8m). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| nokogiri | nokogiri | < 1.13.6 |
| apple | macos | ≥ 13.0 < 13.1 |
Official advisories
- ruby4.0-rubygem-nokogiri-1.18.9-1.4 on GA media · SUSE · openSUSE-SU-2026:10356-1 · Mar 13, 2026 Critical
Vendor, CERT and distribution advisories that name this CVE. Original titles.
Official sources
References
Links published by the sources. Open them with care.
- github.com
- github.com Patch Third Party Advisory
- github.com Release Notes Third Party Advisory
- github.com Issue Tracking Third Party Advisory
- securitylab.github.com
- seclists.org Mailing List Third Party Advisory
- security.gentoo.org Third Party Advisory
- securitylab.github.com Exploit Third Party Advisory
- support.apple.com Third Party Advisory