cve.bz

CVE-2022-32209 Cross-site Scripting

6.1 mediumExploit referenceEPSS 30%Fix available

Medium (6.1). EPSS 30% estimated probability of exploitation activity in the next 30 days. Fixed in rails-html-sanitizer 1.4.3.

On this page
# Possible XSS Vulnerability in Rails::Html::SanitizerThere is a possible XSS vulnerability with certain configurations of Rails::Html::Sanitizer.This vulnerability has been assigned the CVE identifier CVE-2022-32209.Versions Affected: ALLNot affected: NONEFixed Versions: v1.4.3## ImpactA possible XSS vulnerability with certain configurations of Rails::Html::Sanitizer may allow an attacker to inject content if the application developer has overridden the sanitizer's allowed tags to allow both `select` and `style` elements.Code is only impacted if allowed tags are being overridden. This may be done via application configuration:```ruby# In config/application.rbconfig.action_view.sanitized_allowed_tags = ["select", "style"]```see https://guides.rubyonrails.org/configuring.html#configuring-action-viewOr it may be done with a `:tags` option to the Action View helper `sanitize`:```<%= sanitize @comment.body, tags: ["select", "style"] %>```see https://api.rubyonrails.org/classes/ActionView/Helpers/SanitizeHelper.html#method-i-sanitizeOr it may be done with Rails::Html::SafeListSanitizer directly:```ruby# class-level optionRails::Html::SafeListSanitizer.allowed_tags = ["select", "style"]```or```ruby# instance-level optionRails::Html::SafeListSanitizer.new.sanitize(@article.body, tags: ["select", "style"])```All users overriding the allowed tags by any of the above mechanisms to include both "select" and "style" should either upgrade or use one of the workarounds immediately.## ReleasesThe FIXED releases are available at the normal locations.## WorkaroundsRemove either `select` or `style` from the overridden allowed tags.## CreditsThis vulnerability was responsibly reported by [windshock](https://hackerone.com/windshock?type=user).

Severity

CVSS 3.1

6.1 medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
EPSS
30% (up from 27% a week ago; 30% 30 days ago) estimated probability of exploitation activity in the next 30 days; 98th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CWE
CWE-79 Improper Neutralization of Input During Web Page Generation (Cross-site Scripting)
OWASP Top 10
A05:2025 Injection
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-32209 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2022-32209?via=ask-ai-copy and https://cve.bz/cve/CVE-2022-32209?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-32209 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
rubyonrails:rails_html_sanitizersbefore 1.4.3
fedoraproject:fedora35
fedoraproject:fedora36
debian:debian_linux10.0

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-pg8v-g4xq-hww9RubyGemsrails-html-sanitizer<1.4.31.4.3

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian10ruby-rails-html-sanitizer1.0.4-1+deb10u1DLA-3227-1
Debian11ruby-rails-html-sanitizer1.3.0-1+deb11u1DLA-3902-1
Debian12, 13, 14ruby-rails-html-sanitizer1.4.3-0.1DEBIAN-CVE-2022-32209
Ubuntu16.04:LTS, 18.04:LTS, 20.04:LTS and 1 moreruby-rails-html-sanitizerno fix listedUBUNTU-CVE-2022-32209
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 2 morerubygem-rails-html-sanitizer1.0.4-150000.4.3.1SUSE-SU-2022:2870-1
SUSEOpenStack Cloud Crowbar 8, OpenStack Cloud Crowbar 9rubygem-rails-html-sanitizer1.0.3-8.11.1SUSE-SU-2022:2885-1
openSUSELeap 15.3, Leap 15.4rubygem-rails-html-sanitizer1.0.4-150000.4.3.1SUSE-SU-2022:2870-1
openSUSETumbleweedruby3.2-rubygem-rails-html-sanitizer1.5.0-2.1openSUSE-SU-2024:13137-1
openSUSETumbleweedrubygem-rails-html-sanitizer1.4.3-1.1openSUSE-SU-2024:12145-1
openSUSETumbleweedrubygem-rails-html-sanitizer1.6.0-1.5openSUSE-SU-2024:14175-1
openSUSETumbleweedrubygem-rails-html-sanitizer1.6.0-1.7openSUSE-SU-2025:15125-1
openSUSETumbleweedrubygem-rails-html-sanitizer1.6.0-1.9openSUSE-SU-2026:10361-1
Rocky Linux8libdb0:5.3.28-42.el8_4RLSA-2022:8506

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; Rocky Linux's errata, BSD-3-Clause. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE.

Red Hat

Red Hat rates this Important.

ProductPackageStateAdvisory
Red Hat Satellite 6.12 for RHEL 8rubygem-rails-html-sanitizer-0:1.4.3-2.el8satFixed 2022-11-16RHSA-2022:8506

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-32209.

Attack patterns (CAPEC)

  • CAPEC-63 Cross-Site Scripting (XSS) Likelihood: High · Severity: Very High
  • CAPEC-85 AJAX Footprinting Likelihood: High · Severity: Low
  • CAPEC-209 XSS Using MIME Type Mismatch Severity: Medium
  • CAPEC-588 DOM-Based XSS Likelihood: High · Severity: Very High
  • CAPEC-591 Reflected XSS Likelihood: High · Severity: Very High
  • CAPEC-592 Stored XSS Likelihood: High · Severity: Very High

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

References

Check your stackJSON