CVE-2022-29181
CVE-2022-29181 is a high-severity vulnerability in Nokogiri with a CVSS 3.x base score of 8.2. It is not currently listed as actively exploited by CISA, and its EPSS exploit-prediction score is low. The underlying weakness is classified as CWE-843.
Key facts
- Severity: High (CVSS 3.x base score 8.2)
- CVSS v2: 6.4
- EPSS exploit prediction: 3% (87th percentile)
- Actively exploited: Not listed in CISA KEV
- Weakness: CWE-843
- Affected product: Nokogiri
- Published:
- Last modified:
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.
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.
- How severe is CVE-2022-29181?
- CVE-2022-29181 has a CVSS 3.x base score of 8.2, rated high severity. It is exploitable over network with low attack complexity, requires no privileges and no user interaction. Impact on confidentiality is low, integrity none, and availability high.
- Is CVE-2022-29181 being actively exploited?
- It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 3% (87th percentile), an estimate of the probability of exploitation in the next 30 days.
- What products are affected by CVE-2022-29181?
- CVE-2022-29181 primarily affects Nokogiri. In total, 2 product configurations (CPEs) are listed as vulnerable; see the affected-products list for the exact versions.
- How do I fix CVE-2022-29181?
- Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround. Given its high severity, prioritise patching exposed systems.
- When was CVE-2022-29181 published?
- CVE-2022-29181 was published on 2022-05-20 and last updated on 2026-06-17.
References
- https://github.com/sparklemotion/nokogiri/commit/83cc451c3f29df397caa890afc3b714eae6ab8f7
- https://github.com/sparklemotion/nokogiri/commit/db05ba9a1bd4b90aa6c76742cf6102a7c7297267
- https://github.com/sparklemotion/nokogiri/releases/tag/v1.13.6
- https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-xh29-r2w5-wx8m
- https://securitylab.github.com/advisories/GHSL-2022-031_GHSL-2022-032_Nokogiri
- http://seclists.org/fulldisclosure/2022/Dec/23
- https://security.gentoo.org/glsa/202208-29
- https://securitylab.github.com/advisories/GHSL-2022-031_GHSL-2022-032_Nokogiri/
- https://support.apple.com/kb/HT213532
Affected products (2)
- cpe:2.3:a:nokogiri:nokogiri:*:*:*:*:*:ruby:*:*
- cpe:2.3:o:apple:macos:*:*:*:*:*:*:*:*
More vulnerabilities in Nokogiri
- CVE-2019-5477 — Critical (CVSS 9.8): A command injection vulnerability in Nokogiri v1.10.3 and earlier allows commands to be executed in a subprocess via…
- CVE-2026-57236 — High (CVSS 8.2): Nokogiri is an open source XML and HTML library for the Ruby programming language. Prior to 1.19.4, calling…
- CVE-2026-57235 — High (CVSS 8.2): Nokogiri is an open source XML and HTML library for the Ruby programming language. Prior to 1.19.4,…
- CVE-2026-57435 — High (CVSS 7.5): Nokogiri is an open source XML and HTML library for the Ruby programming language. Prior to 1.19.4, Nokogiri’s CRuby…
- CVE-2026-57434 — High (CVSS 7.5): Nokogiri is an open source XML and HTML library for the Ruby programming language. Prior to 1.19.4, Nokogiri contains a…
- CVE-2022-23476 — High (CVSS 7.5): Nokogiri is an open source XML and HTML library for the Ruby programming language. Nokogiri `1.13.8` and `1.13.9` fail…
Other CWE-843 vulnerabilities
- CVE-2021-33970 — Critical (CVSS 10.0): Buffer Overflow vulnerability in Qihoo 360 Chrome v13.0.2170.0 allows attacker to escalate priveleges.
- CVE-2010-2299 — Critical (CVSS 10.0): The Clipboard::DispatchObject function in app/clipboard/clipboard.cc in Google Chrome before 5.0.375.70 does not…
- CVE-2023-22579 — Critical (CVSS 9.9): Due to improper parameter filtering in the sequalize js library, can a attacker peform injection.
- CVE-2026-16919 — Critical (CVSS 9.8): IBM AIX 7.2, and 7.3 and IBM PowerVM VIOS 4.1 could allow a remote attacker to execute arbitrary code due to improper…
- CVE-2026-71558 — Critical (CVSS 9.8): Heap type confusion vulnerability in Apache Fory C++ deserialization. This issue affects Apache Fory C++ versions from…
- CVE-2026-64727 — Critical (CVSS 9.8): A type confusion issue was addressed with improved memory handling. This issue is fixed in macOS Tahoe 26.6, tvOS 26.6.…