CVE-2022-29181Improper Handling of Unexpected Data Type in Nokogiri
- 8.2HighCVSS base score
- 3.2%Exploitation in 30 daysEPSS · top 12% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- YesPublic exploitsa reference or SSVC says so
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.
Public exploit
An exploit or proof of concept is public: anyone can try it against an unpatched system. CISA's SSVC rates its exploitation: a proof of concept is public.
Timeline
ID reserved
By GitHub_M
- 37 days later
· 37 days later
Published
- 3 years later
· 3 years later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_MCNA (assigner) | 3.1 | High8.2 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H |
| NVDNVD · Modified | 3.1 | High8.2 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H |
- EPSS (exploitation in 30 days)
- 3.2% · top 12% of all CVEs (13 Nov 2026)
- CISA SSVC
- Exploitation: poc · Automatable: yes · Technical impact: partial
The list uses the assigner's score when there is one, then CISA's, then NVD's: High 8.2.
Affected products
- affected < 1.13.6
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- RubyGemsnokogiriGHSA-xh29-r2w5-wx8m (opens in a new tab)
References
References9
- https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-xh29-r2w5-wx8m (opens in a new tab)x_refsource_CONFIRMx_transferred
- https://github.com/sparklemotion/nokogiri/commit/83cc451c3f29df397caa890afc3b714eae6ab8f7 (opens in a new tab)x_refsource_MISC
- https://github.com/sparklemotion/nokogiri/commit/db05ba9a1bd4b90aa6c76742cf6102a7c7297267 (opens in a new tab)x_refsource_MISCx_transferred
- https://github.com/sparklemotion/nokogiri/releases/tag/v1.13.6 (opens in a new tab)x_refsource_MISCx_transferred
- https://securitylab.github.com/advisories/GHSL-2022-031_GHSL-2022-032_Nokogiri (opens in a new tab)x_refsource_MISC
- https://securitylab.github.com/advisories/GHSL-2022-031_GHSL-2022-032_Nokogiri/ (opens in a new tab)x_transferred
- GLSA-202208-29 (opens in a new tab)vendor-advisoryx_transferred
- https://support.apple.com/kb/HT213532 (opens in a new tab)x_transferred
- 20221220 APPLE-SA-2022-12-13-4 macOS Ventura 13.1 (opens in a new tab)mailing-listx_transferred
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2022-5789 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-xh29-r2w5-wx8m (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2022-29181)Record last updated .