Skip to main content
Public proof of conceptFix available

CVE-2022-29181

A public proof of concept exists; no exploitation attested.

  • Published2022-05-20
  • Fixed in1.13.6
  • WeaknessCWE-241 · CWE-843

Am I affected?

With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.

Description

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.

Timeline

dates in UTC
  1. 2022-05-2019:15CVE publishedNVD

Versions per branch

NVD · OSV
Nokogiri
BranchAffectedFixed in
1.13< 1.13.61.13.6
Apple macos
BranchAffectedFixed in
13.x≥ 13.0, < 13.113.1

as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.

Products declared by the CNA1 product

As GitHub_M, the CNA that assigned this CVE, declared them in the CVE record; versions as written.

  • sparklemotion nokogiri
    Affected
    • = < 1.13.6no fix stated

Source: the CNA record (CVE Program), © The MITRE Corporation,CVE terms of useCVE recordupdated 2025-05-27

Distribution builds and vendor advisories

Packages from OSV.dev and products from the vendors' CSAF advisories.

version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.

Packages

  • candlepinRed Hat:satellite:6.12::el8all versions · fixed in 0:4.1.15-1.el8satand 1 other package
  • foremanRed Hat:satellite:6.12::el8all versions · fixed in 0:3.3.0.17-1.el8satand 13 other packages
  • foremanRed Hat:satellite_utils:6.12::el8all versions · fixed in 0:3.3.0.17-1.el8satand 1 other package
  • foremanRed Hat:satellite_capsule:6.12::el8all versions · fixed in 0:3.3.0.17-1.el8satand 1 other package
  • python-djangoRed Hat:satellite:6.12::el8all versions · fixed in 0:3.2.14-2.el8pcand 1 other package
  • python-djangoRed Hat:satellite_capsule:6.12::el8all versions · fixed in 0:3.2.14-2.el8pcand 1 other package
  • ruby-nokogiriUbuntu:Pro:22.04:LTSall versions · fixed in 1.13.1+dfsg-2ubuntu0.1~esm1
  • ruby-nokogiriUbuntu:Pro:20.04:LTSall versions · fixed in 1.10.7+dfsg1-2ubuntu0.1~esm2

35 more package ranges on OSV.dev

Vendor advisories

  • CVE-2022-29181 Red Hat Product Security4 products fixed · 3 known affected

    rubygem-nokogiri: Improper Handling of Unexpected Data Type in Nokogiri

    rubygem-nokogiri as a component of CloudForms Management Engine 5 · rubygem-nokogiri-doc as a component of CloudForms Management Engine 5 · rubygem-nokogiri.src as a component of CloudForms Management Engine 5

  • RHSA-2022:8506 Red Hat Product Security4 products fixed

    Red Hat Security Advisory: Satellite 6.12 Release

Full record on NVD

Fix

  1. Update Nokogiri to 1.13.6
  2. Vendor fix Red Hat Product Security RHSA-2022:8506 · 8 productsFor Red Hat Satellite 6.12, see the following documentation for the release. https://access.redhat.com/documentation/en-us/red_hat_satellite/6.12 The important instructions on how to upgrade are available below. https://access.redhat.com/documentation/en-us/red_hat_satellite/6.12/html/upgrading_an…
  3. Workaround from the vendor Red Hat Product Security RHSA-2022:8506 · 1,833 productsTo avoid this vulnerability in affected applications, ensure the untrusted input is a String by calling #to_s or equivalent.
  4. No fix planned, says the vendor Red Hat Product Security CVE-2022-29181 · 3 productsWill not fix

Advisories and patches

Detection

Nuclei template
none so far
ProjectDiscovery
Exploit-DB
no entry
Exploit-DB
Proof of concept
Metasploit modules
none listed
Metasploit Framework

Sources

  • CISA-ADPSSVC decisionpoc2025-04-22
  • CNACVSS 3.18.2known since 2026-10-23
  • NVDCVSS 3.18.2read 2026-10-23
  • NVDCVSS 2.06.4read 2026-10-23
  • CNAweakness (CWE)CWE-241known since 2026-10-23
  • NVDweakness (CWE)CWE-843read 2026-10-23
  • FIRST EPSSEPSS score3.2 %2026-12-04
  • OSVaffected packages—
  • GitHub AdvisoriesadvisoryHigh2022-05-23

Identifiers

Technical details

CVSS v3 vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H
Published
2022-05-20
Last modified
2026-06-17
NVD status
Modified
GitHub advisory
GHSA-xh29-r2w5-wx8m

Frequently asked questions

What is CVE-2022-29181?

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.

Is CVE-2022-29181 actively exploited?

A proof-of-concept exploit exists for CVE-2022-29181, but active exploitation has not been confirmed at this time.

What is the CVSS score for CVE-2022-29181?

CVE-2022-29181 has a CVSS v3 base score of 8.2 (High severity), with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H.

Running nokogiri? Hear about its next vulnerability

Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».

No credit card required · No monthly cap on website checks · 250 API requests/month

Sources for this record