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-23520

rubygem-rails-html-sanitizer: Cross site scripting vulnerability with certain configurations

Overview

Published
14 Dec 2022
Modified
17 Jun 2026
Medium CVE
1 Registry packages
12 OS packages
6 Linux distributions
Yes Fix available

Description

rails-html-sanitizer is responsible for sanitizing HTML fragments in Rails applications. Prior to version 1.4.4, there is a possible XSS vulnerability with certain configurations of Rails::Html::Sanitizer due to an incomplete fix of CVE-2022-32209. 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 issue is patched in version 1.4.4. All users overriding the allowed tags to include both "select" and "style" should either upgrade or use this workaround: Remove either "select" or "style" from the overridden allowed tags. NOTE: Code is _not_ impacted if allowed tags are overridden using either the :tags option to the Action View helper method sanitize or the :tags option to the instance method SafeListSanitizer#sanitize.

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-23520
EcosystemPackageVulnerableFixed in
RubyGems rails-html-sanitizer <1.4.4 1.4.4

Open a package to see all its vulnerabilities.

Operating systems · 15 fixes

Red Hat 1 release · 1 package

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

SUSE Linux Enterprise 2 releases · 1 package

fixed 2
ruby2-5-rubygem-rails-html-sanitizer
SUSE Linux Enterprise fixes for CVE-2022-23520
ReleasePackageFixed inAdvisory
15.4 ruby2-5-rubygem-rails-html-sanitizer 1.0.4-150000.4.6.1 SUSE-SU-2023:3714-1
15.5 ruby2-5-rubygem-rails-html-sanitizer 1.0.4-150000.4.6.1 SUSE-SU-2023:3714-1

debian 5 releases · 1 package

fixed 5
ruby-rails-html-sanitizer
debian fixes for CVE-2022-23520
ReleasePackageFixed in
10 ruby-rails-html-sanitizer 1.0.4-1+deb10u2
11 ruby-rails-html-sanitizer 1.3.0-1+deb11u1
12 ruby-rails-html-sanitizer 1.4.4-1
13 ruby-rails-html-sanitizer 1.4.4-1
14 ruby-rails-html-sanitizer 1.4.4-1

echo 1 release · 1 package

fixed 1
ruby-rails-html-sanitizer
echo fixes for CVE-2022-23520
ReleasePackageFixed in
ruby-rails-html-sanitizer 1.4.4-1

openSUSE 1 release · 4 packages

fixed 4
ruby3-1-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-23520
ReleasePackageFixed inAdvisory
Tumbleweed ruby3-1-rubygem-rails-html-sanitizer +1 1.5.0-1.1 openSUSE-SU-2024:12769-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

seal Red Hat 2 releases · 2 packages

fixed 2
python-jinja2 libsolv
seal Red Hat fixes for CVE-2022-23520
ReleasePackageFixed in
7 python-jinja2 +1 2.7.2-4.el7+sp999
8 libsolv +1 0.7.20-6.el8+sp999

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.