CVE Radar

CVE Radar Logo
CVERadar

Edition used by more than 30,000 companies in more than 150 countries.
Sign Up For Free

CVE-2022-29181

High Severity|Nokogiri
57
SVRS
8.2
CVSSv3
0.02886
EPSS
TAGSNo tags available
VECTOR STRING
CVSS:3.1AV:NAC:LPR:NUI:NS:UC:LI:NA:H
PUBLICATION DATE2022-05-20
LAST MODIFIED2025-05-27

Deep CVE Analysis in Progress

The system is currently conducting an in-depth analysis of the selected CVE. This includes advanced correlation, vulnerability classification, and cross-referencing with real-time threat intelligence sources. Once the analysis is complete, the page will automatically update with enriched vulnerability data and actionable insights.

Security Intelligence Brief

1. What is this vulnerability and why does it matter?
This vulnerability, identified as CVE-2022-29181, exists in Nokogiri, an open-source XML and HTML library for Ruby. The flaw stems from a lack of proper type-checking for inputs processed by its XML and HTML4 SAX parsers. This allows an attacker to provide specially crafted untrusted inputs, which can lead to illegal memory access errors, resulting in a segmentation fault (segfault) or the ability to read from unrelated memory locations. This vulnerability is critical because it can cause a denial of service (via segfault) in applications relying on Nokogiri to process untrusted data, or potentially lead to information disclosure by allowing unauthorized reading of memory, compromising data confidentiality.
2. What are the CVSS score, severity level, and disclosure details?
The CVSS score for this vulnerability is 8.2. Based on this score, the severity level is classified as High. The vulnerability was publicly disclosed on 2022-05-20 00:00:00, with its last modification date being 2025-05-27 14:51:01.
3. Which products, vendors, systems, and versions are affected?
  • Product: Nokogiri (an open source XML and HTML library)
  • Vendors: The Nokogiri project maintainers.
  • Systems: Any application or system that utilizes the Nokogiri library within a Ruby environment.
  • Versions: All versions of Nokogiri prior to 1.13.6 are affected.
4. What is the technical root cause and attack vector?
The technical root cause of this vulnerability is improper input validation, specifically the lack of type-checking for inputs passed to Nokogiri's XML and HTML4 SAX parsers. This allows malformed or unexpected data types to be processed in a way that leads to memory safety issues. The primary attack vector involves supplying specially crafted untrusted inputs to applications that use vulnerable versions of Nokogiri for parsing XML or HTML content.
5. How can this vulnerability be exploited?
This vulnerability can be exploited by an attacker who can provide malicious, specially crafted input to an application that uses a vulnerable version of the Nokogiri library. When the application attempts to parse this untrusted input using Nokogiri's XML or HTML4 SAX parsers, the lack of type-checking leads to illegal memory access errors. This can manifest as a denial of service (DoS) by causing the application to crash due to a segmentation fault (segfault), or potentially allow the attacker to read sensitive data from unrelated memory regions, leading to information disclosure.
6. What mitigation steps and patches are available?
  • Patch: The primary mitigation is to upgrade Nokogiri to version 1.13.6 or later, as this version contains a patch that addresses the issue.
  • Workaround: If immediate patching is not feasible, a workaround involves ensuring that any untrusted input processed by Nokogiri's SAX parsers is explicitly converted to a String data type. This can be achieved by calling the #to_s method or an equivalent method on the input before passing it to Nokogiri.
7. How can vulnerable systems be detected?
Vulnerable systems can be detected by identifying the version of the Nokogiri gem installed in Ruby applications. Any application utilizing Nokogiri versions earlier than 1.13.6 is considered vulnerable to CVE-2022-29181. System administrators and developers should check their Gemfile.lock or installed gem list to determine the current version.
10. What public intelligence references and advisories exist?
  • CVE Identifier: CVE-2022-29181
  • Common Weakness Enumeration (CWE):
    • CWE-241: Improper Handling of Undefined Values
    • CWE-843: Access of Uninitialized Pointer
  • Project Advisories: The official Nokogiri project releases typically include advisories for security fixes, which would reference the patch in version 1.13.6.
11. What is the risk assessment and urgency level?
The risk level for CVE-2022-29181 is assessed as High, primarily due to its CVSS score of 8.2. The potential impacts include denial of service, which can severely disrupt application availability, and information disclosure through illegal memory reads, which can compromise sensitive data. The urgency level for addressing this vulnerability is also High, especially for applications that process external or untrusted XML/HTML inputs. Organizations are strongly advised to apply the available patch (upgrade to Nokogiri 1.13.6 or later) or implement the recommended workaround immediately to prevent potential exploitation and mitigate associated risks.

No IOCs found for this CVE

No exploits found for this CVE

SOCRadar Logo

Enhance Your CVE Management with SOCRadar Vulnerability Intelligence

Get comprehensive CVE details, real-time notifications, and proactive threat management all in one platform.

CREATE FREE ACCOUNT
CVE Details
Access comprehensive CVE information instantly
Real-time Tracking
Subscribe to CVEs and get instant updates
Exploit Analysis
Monitor related APT groups and threats
IOC Tracking
Analyze and track CVE-related IOCs
CVE-2022-29181 | Nokogiri up to 1.13.5 on Ruby XML Parser/HTML4 SAX Parser #to_s memory corruption (GHSA-xh29-r2w5-wx8m / Nessus ID 242573)
vuldb.com2025-07-23
CVE-2022-29181 | Nokogiri up to 1.13.5 on Ruby XML Parser/HTML4 SAX Parser #to_s memory corruption (GHSA-xh29-r2w5-wx8m / Nessus ID 242573) | A vulnerability was found in Nokogiri up to 1.13.5 on Ruby. It has been classified as critical. Affected is the function #to_s of the component XML Parser/HTML4 SAX Parser. The manipulation leads to memory corruption. This vulnerability is traded as <a href
vuldb.comrssforumnews
CVE-2022-29181 | Apple macOS up to 13.0 Ruby unexpected data type (HT213532 / Nessus ID 242573)
vuldb.com2025-07-23
CVE-2022-29181 | Apple macOS up to 13.0 Ruby unexpected data type (HT213532 / Nessus ID 242573) | A vulnerability was found in Apple macOS and classified as critical. This issue affects some unknown processing of the component Ruby. The manipulation leads to improper handling of unexpected data type. The identification of this vulnerability is CVE-2022-29181. The attack may be initiated remotely. There is
vuldb.comrssforumnews
USN-7659-1: Nokogiri vulnerabilities
2025-07-22
USN-7659-1: Nokogiri vulnerabilities | It was discovered Nokogiri did not correctly parse XML Schemas. If a user or automated system were tricked into opening a specially crafted file, an attacker could possibly use this issue to execute arbitrary code. This issue only affected Ubuntu 20.04 LTS. (CVE-2020-26247) Agustin Gianni discovered that Nokogiri did not correctly parse XML and HTML files. If a user or automated system were tricked into opening a specially crafted file, an attacker could possibly use this issue to cause a denial of service or leak sensitive information. (CVE-2022-29181)
ubuntu.comrssforumnews

No tweets found for this CVE

Configuration 1
TypeVendorProduct
AppNokogirinokogiri
Configuration 2
TypeVendorProduct
OSApplemacos
ReferenceLink
AF854A3A-2127-422B-91AE-364DA2661108http://seclists.org/fulldisclosure/2022/Dec/23
AF854A3A-2127-422B-91AE-364DA2661108https://github.com/sparklemotion/nokogiri/commit/db05ba9a1bd4b90aa6c76742cf6102a7c7297267
AF854A3A-2127-422B-91AE-364DA2661108https://github.com/sparklemotion/nokogiri/releases/tag/v1.13.6
AF854A3A-2127-422B-91AE-364DA2661108https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-xh29-r2w5-wx8m
AF854A3A-2127-422B-91AE-364DA2661108https://security.gentoo.org/glsa/202208-29
AF854A3A-2127-422B-91AE-364DA2661108https://securitylab.github.com/advisories/GHSL-2022-031_GHSL-2022-032_Nokogiri/
AF854A3A-2127-422B-91AE-364DA2661108https://support.apple.com/kb/HT213532
[email protected]https://github.com/sparklemotion/nokogiri/commit/83cc451c3f29df397caa890afc3b714eae6ab8f7
[email protected]https://github.com/sparklemotion/nokogiri/commit/db05ba9a1bd4b90aa6c76742cf6102a7c7297267
[email protected]https://github.com/sparklemotion/nokogiri/releases/tag/v1.13.6
[email protected]https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-xh29-r2w5-wx8m
[email protected]https://securitylab.github.com/advisories/GHSL-2022-031_GHSL-2022-032_Nokogiri
CONFIRMhttps://github.com/sparklemotion/nokogiri/security/advisories/GHSA-xh29-r2w5-wx8m
MISChttps://github.com/sparklemotion/nokogiri/releases/tag/v1.13.6
MISChttps://github.com/sparklemotion/nokogiri/commit/db05ba9a1bd4b90aa6c76742cf6102a7c7297267
MISChttps://securitylab.github.com/advisories/GHSL-2022-031_GHSL-2022-032_Nokogiri/
CONFIRMhttps://github.com/sparklemotion/nokogiri/security/advisories/GHSA-xh29-r2w5-wx8m
MISChttps://github.com/sparklemotion/nokogiri/commit/db05ba9a1bd4b90aa6c76742cf6102a7c7297267
MISChttps://github.com/sparklemotion/nokogiri/releases/tag/v1.13.6
MISChttps://securitylab.github.com/advisories/GHSL-2022-031_GHSL-2022-032_Nokogiri/
CONFIRMhttps://github.com/sparklemotion/nokogiri/security/advisories/GHSA-xh29-r2w5-wx8m
GENTOOhttps://security.gentoo.org/glsa/202208-29
MISChttps://github.com/sparklemotion/nokogiri/releases/tag/v1.13.6
MISChttps://github.com/sparklemotion/nokogiri/commit/db05ba9a1bd4b90aa6c76742cf6102a7c7297267
MISChttps://securitylab.github.com/advisories/GHSL-2022-031_GHSL-2022-032_Nokogiri/
CONFIRMhttps://github.com/sparklemotion/nokogiri/security/advisories/GHSA-xh29-r2w5-wx8m
CONFIRMhttps://support.apple.com/kb/HT213532
GENTOOhttps://security.gentoo.org/glsa/202208-29
MISChttps://github.com/sparklemotion/nokogiri/releases/tag/v1.13.6
MISChttps://github.com/sparklemotion/nokogiri/commit/db05ba9a1bd4b90aa6c76742cf6102a7c7297267
MISChttps://securitylab.github.com/advisories/GHSL-2022-031_GHSL-2022-032_Nokogiri/
CONFIRMhttps://github.com/sparklemotion/nokogiri/security/advisories/GHSA-xh29-r2w5-wx8m
CONFIRMhttps://support.apple.com/kb/HT213532
FULLDISChttp://seclists.org/fulldisclosure/2022/Dec/23
GENTOOhttps://security.gentoo.org/glsa/202208-29
MISChttps://github.com/sparklemotion/nokogiri/releases/tag/v1.13.6
MISChttps://github.com/sparklemotion/nokogiri/commit/db05ba9a1bd4b90aa6c76742cf6102a7c7297267
MISChttps://securitylab.github.com/advisories/GHSL-2022-031_GHSL-2022-032_Nokogiri/
GITHUBhttp://seclists.org/fulldisclosure/2022/Dec/23
GITHUBhttps://securitylab.github.com/advisories/GHSL-2022-031_GHSL-2022-032_Nokogiri/
20221220 APPLE-SA-2022-12-13-4 MACOS VENTURA 13.1http://seclists.org/fulldisclosure/2022/Dec/23
GLSA-202208-29https://security.gentoo.org/glsa/202208-29
HTTPS://GITHUB.COM/SPARKLEMOTION/NOKOGIRI/COMMIT/83CC451C3F29DF397CAA890AFC3B714EAE6AB8F7https://github.com/sparklemotion/nokogiri/commit/83cc451c3f29df397caa890afc3b714eae6ab8f7
HTTPS://GITHUB.COM/SPARKLEMOTION/NOKOGIRI/COMMIT/DB05BA9A1BD4B90AA6C76742CF6102A7C7297267https://github.com/sparklemotion/nokogiri/commit/db05ba9a1bd4b90aa6c76742cf6102a7c7297267
HTTPS://GITHUB.COM/SPARKLEMOTION/NOKOGIRI/RELEASES/TAG/V1.13.6https://github.com/sparklemotion/nokogiri/releases/tag/v1.13.6
HTTPS://GITHUB.COM/SPARKLEMOTION/NOKOGIRI/SECURITY/ADVISORIES/GHSA-XH29-R2W5-WX8Mhttps://github.com/sparklemotion/nokogiri/security/advisories/GHSA-xh29-r2w5-wx8m
HTTPS://SECURITYLAB.GITHUB.COM/ADVISORIES/GHSL-2022-031_GHSL-2022-032_NOKOGIRIhttps://securitylab.github.com/advisories/GHSL-2022-031_GHSL-2022-032_Nokogiri
AF854A3A-2127-422B-91AE-364DA2661108http://seclists.org/fulldisclosure/2022/Dec/23
AF854A3A-2127-422B-91AE-364DA2661108https://github.com/sparklemotion/nokogiri/commit/db05ba9a1bd4b90aa6c76742cf6102a7c7297267
AF854A3A-2127-422B-91AE-364DA2661108https://github.com/sparklemotion/nokogiri/releases/tag/v1.13.6
AF854A3A-2127-422B-91AE-364DA2661108https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-xh29-r2w5-wx8m
AF854A3A-2127-422B-91AE-364DA2661108https://security.gentoo.org/glsa/202208-29
AF854A3A-2127-422B-91AE-364DA2661108https://securitylab.github.com/advisories/GHSL-2022-031_GHSL-2022-032_Nokogiri/
AF854A3A-2127-422B-91AE-364DA2661108https://support.apple.com/kb/HT213532
[email protected]https://github.com/sparklemotion/nokogiri/commit/83cc451c3f29df397caa890afc3b714eae6ab8f7
[email protected]https://github.com/sparklemotion/nokogiri/commit/db05ba9a1bd4b90aa6c76742cf6102a7c7297267
[email protected]https://github.com/sparklemotion/nokogiri/releases/tag/v1.13.6
[email protected]https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-xh29-r2w5-wx8m
[email protected]https://securitylab.github.com/advisories/GHSL-2022-031_GHSL-2022-032_Nokogiri
GITHUBhttp://seclists.org/fulldisclosure/2022/Dec/23
GITHUBhttps://securitylab.github.com/advisories/GHSL-2022-031_GHSL-2022-032_Nokogiri
GITHUBhttps://securitylab.github.com/advisories/GHSL-2022-031_GHSL-2022-032_Nokogiri/
CWE IDCWE NameDescription
CWE-241Improper Handling of Unexpected Data TypeThe software does not handle or incorrectly handles when a particular element is not the expected type, e.g. it expects a digit (0-9) but is provided with a letter (A-Z).
CWE-843Access of Resource Using Incompatible Type ('Type Confusion')The program allocates or initializes a resource such as a pointer, object, or variable using one type, but it later accesses that resource using a type that is incompatible with the original type.

CVE Radar

Real-time CVE Intelligence & Vulnerability Management Platform

CVE Radar provides comprehensive vulnerability intelligence by monitoring CVE databases, security advisories, and threat feeds. Get instant updates on new vulnerabilities, exploit details, and mitigation strategies specific to your assets.