cve.bz

CVE-2022-29181 Type Confusion

8.2 highExploit referenceEPSS 3.2%Fix available

High (8.2). EPSS 3.2% estimated probability of exploitation activity in the next 30 days. Fixed in nokogiri 1.13.6.

On this page
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.

Severity

CVSS 3.1

8.2 high
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H
EPSS
3.2% (unchanged from 3.2% a week ago; 3.2% 30 days ago) estimated probability of exploitation activity in the next 30 days; 89th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: PoC · Automatable: yes · Technical impact: partial, assessed 2025-04-22. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWEs
CWE-843 Access of Resource Using Incompatible Type (Type Confusion)
CWE-241 Improper Handling of Unexpected Data Type
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2022-29181 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2022-29181?via=ask-ai-copy and https://cve.bz/cve/CVE-2022-29181?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2022-29181 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
nokogiri:nokogiribefore 1.13.6
apple:macosfrom 13.0 before 13.1

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-xh29-r2w5-wx8mRubyGemsnokogiri<1.13.61.13.6

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13, 14ruby-nokogiri1.13.7+dfsg-1DEBIAN-CVE-2022-29181
UbuntuPro:20.04:LTSruby-nokogiri1.10.7+dfsg1-2ubuntu0.1~esm2UBUNTU-CVE-2022-29181 USN-7659-1
UbuntuPro:22.04:LTSruby-nokogiri1.13.1+dfsg-2ubuntu0.1~esm1UBUNTU-CVE-2022-29181 USN-7659-1
Red Hatsatellite:6.12::el8candlepin, candlepin-selinux0:4.1.15-1.el8satRHSA-2022:8506
Red Hatsatellite:6.12::el8foreman, foreman-cli, foreman-ec2 and 11 more0:3.3.0.17-1.el8satRHSA-2022:8506
Red Hatsatellite:6.12::el8rubygem-git0:1.11.0-1.el8satRHSA-2022:8506
Red Hatsatellite:6.12::el8rubygem-rails-html-sanitizer0:1.4.3-2.el8satRHSA-2022:8506
Red Hatsatellite:6.12::el8, satellite_capsule:6.12::el8python-django, python39-django0:3.2.14-2.el8pcRHSA-2022:8506
Red Hatsatellite:6.12::el8, satellite_capsule:6.12::el8rubygem-nokogiri, rubygem-nokogiri-debuginfo, rubygem-nokogiri-debugsource0:1.13.8-1.el8satRHSA-2022:8506
Red Hatsatellite:6.12::el8, satellite_capsule:6.12::el8rubygem-sinatra1:2.2.0-1.el8satRHSA-2022:8506
Red Hatsatellite_capsule:6.12::el8foreman, foreman-debug0:3.3.0.17-1.el8satRHSA-2022:8506
Red Hatsatellite_utils:6.12::el8foreman, foreman-cli0:3.3.0.17-1.el8satRHSA-2022:8506
SUSELinux Enterprise High Availability Extension 15, Linux Enterprise High Availability Extension 15 SP1, Linux Enterprise High Availability Extension 15 SP2 and 1 morerubygem-nokogiri1.8.5-150000.3.9.1SUSE-SU-2022:4015-1
SUSELinux Enterprise Module for Basesystem 15 SP4rubygem-nokogiri1.8.5-150400.14.3.1SUSE-SU-2022:4016-1
SUSEOpenStack Cloud Crowbar 8, OpenStack Cloud Crowbar 9rubygem-nokogiri1.6.1-5.6.1SUSE-SU-2022:3890-1
openSUSELeap 15.3rubygem-nokogiri1.8.5-150000.3.9.1SUSE-SU-2022:4015-1
openSUSELeap 15.4rubygem-nokogiri1.8.5-150400.14.3.1SUSE-SU-2022:4016-1
openSUSETumbleweedruby3.2-rubygem-nokogiri1.13.9-1.7openSUSE-SU-2024:13165-1
openSUSETumbleweedrubygem-nokogiri1.13.6-1.1openSUSE-SU-2024:12085-1
openSUSETumbleweedrubygem-nokogiri1.15.5-1.5openSUSE-SU-2024:14174-1
openSUSETumbleweedrubygem-nokogiri1.18.2-1.1openSUSE-SU-2025:14697-1
openSUSETumbleweedrubygem-nokogiri1.18.9-1.4openSUSE-SU-2026:10356-1
Alpinev3.16, v3.17, v3.18 and 6 moreruby-nokogiri1.13.6-r0ALPINE-CVE-2022-29181

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; the Alpine secdb, CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE · Alpine.

Red Hat

Red Hat rates this Important.

Red Hat's statement

Red Hat Satellite 6.12 and later versions are not affected by this flaw.

Red Hat's mitigation

To avoid this vulnerability in affected applications, ensure the untrusted input is a String by calling #to_s or equivalent.

ProductPackageStateAdvisory
Red Hat Satellite 6.12 for RHEL 8tfm-rubygem-nokogiri-0:1.13.8-1.el8satFixed 2022-11-16RHSA-2022:8506
CloudForms Management Engine 5rubygem-nokogiriWill not fix

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2022-29181.

Attack patterns (CAPEC)

  • CAPEC-48 Passing Local Filenames to Functions That Expect a URL Likelihood: High · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON