Breaking News: Thousands Of GitHub Accounts Hijacked With wfx-loot CI Secret
Read the Report
Learn How MCP Is Bypassing a Decade of Cloud Security Best Practices
Read the Report
Are you exposed? Connect a repo in minutes.
Scan your repos free

CVE-2022-32209

rubygem-rails-html-sanitizer: possible xss with certain configurations

Overview

Published
24 Jun 2022
Modified
17 Jun 2026
Medium CVE
1 Registry packages
8 OS packages
5 Linux distributions
Yes Fix available

Description

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"]orruby# 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.

Source: OX vulnerability database

Severity

6.1 · MEDIUM

CVSS 3.1 base score, scored by NVD.

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Weakness: CWE-79

Affected packages · 1

Packages affected by CVE-2022-32209
EcosystemPackageVulnerableFixed in
RubyGems rails-html-sanitizer <1.4.3 1.4.3

Open a package to see all its vulnerabilities.

Operating systems · 13 fixes

Red Hat 1 release · 1 package

affected 1
rubygem-rails-html-sanitizer
Red Hat fixes for CVE-2022-32209
ReleasePackageFixed in
7 rubygem-rails-html-sanitizer affected

SUSE Linux Enterprise 1 release · 1 package

fixed 1
ruby2-5-rubygem-rails-html-sanitizer
SUSE Linux Enterprise fixes for CVE-2022-32209
ReleasePackageFixed inAdvisory
15.4 ruby2-5-rubygem-rails-html-sanitizer 1.0.4-150000.4.3.1 SUSE-SU-2022:2870-1

debian 5 releases · 1 package

fixed 5
ruby-rails-html-sanitizer
debian fixes for CVE-2022-32209
ReleasePackageFixed in
10 ruby-rails-html-sanitizer 1.0.4-1+deb10u1
11 ruby-rails-html-sanitizer 1.3.0-1+deb11u1
12 ruby-rails-html-sanitizer 1.4.3-0.1
13 ruby-rails-html-sanitizer 1.4.3-0.1
14 ruby-rails-html-sanitizer 1.4.3-0.1

echo 1 release · 1 package

fixed 1
ruby-rails-html-sanitizer
echo fixes for CVE-2022-32209
ReleasePackageFixed in
ruby-rails-html-sanitizer 1.4.3-0.1

openSUSE 1 release · 5 packages

fixed 5
ruby3-1-rubygem-rails-html-sanitizer ruby3-2-rubygem-rails-html-sanitizer ruby3-3-rubygem-rails-html-sanitizer ruby3-4-rubygem-rails-html-sanitizer ruby4-0-rubygem-rails-html-sanitizer
openSUSE fixes for CVE-2022-32209
ReleasePackageFixed inAdvisory
Tumbleweed ruby3-1-rubygem-rails-html-sanitizer 1.4.3-1.1 openSUSE-SU-2024:12145-1
Tumbleweed ruby3-2-rubygem-rails-html-sanitizer 1.5.0-2.1 openSUSE-SU-2024:13137-1
Tumbleweed ruby3-3-rubygem-rails-html-sanitizer 1.6.0-1.5 openSUSE-SU-2024:14175-1
Tumbleweed ruby3-4-rubygem-rails-html-sanitizer 1.6.0-1.7 openSUSE-SU-2025:15125-1
Tumbleweed ruby4-0-rubygem-rails-html-sanitizer 1.6.0-1.9 openSUSE-SU-2026:10361-1

References

Show all 16 references

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.