VDB

CVE-2022-29181

CVE-2022-29181 PUBLISHED CVSS 8.2 HIGH

Improper Handling of Unexpected Data Type in Nokogiri

Reported by github_m · Published May 20, 2022

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.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
ruby-nokogiriAlpine1.13.6-r0
macosapple13.1

Risk scores

CVSS 3.1
8.2
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H

Affected products

VendorProductVersions
sparklemotionnokogiri< 1.13.6
alpineruby-nokogiri0
sparklemotionnokogiri0
RubyGemsnokogiri0

Timeline

  • May 20, 2022 CVE Published
  • May 21, 2022 EPSS Score (30 in total, the first dated here)
  • Mar 17, 2026 Security Advisory (4 in total, the first dated here)
  • Jun 27, 2026 Coalition ESS Score

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2022-29181
vulnetix vdb fixes CVE-2022-29181

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2022-29181/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›