CVE-2022-29181

Improper Handling of Unexpected Data Type in Nokogiri

Published May 20, 2022 CVSS 3.1 · 8.2 High EPSS 3.2% KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
EUVD EUVD EUVD-2022-5789 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.
Github GHSA Github GHSA GHSA-xh29-r2w5-wx8m Nokogiri Improperly Handles Unexpected Data Type
Ubuntu USN Ubuntu USN USN-7659-1 Nokogiri vulnerabilities
History
Type Values Removed Values Added
Metrics epss

{'score': 0.03268}

epss

{'score': 0.03355}

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
May 27, 2025, 2:51 PM
Reserved
Apr 13, 2022, 12:00 AM
Status
Modified
Published
May 20, 2022, 7:15 PM
Modified
Jun 17, 2026, 4:39 AM
Severity
Important
Public date
May 19, 2022, 12:00 AM