CVE-2022-23520

rails-html-sanitizer contains an incomplete fix for an XSS vulnerability

MEDIUM
6.1
CVSS Score
Published: December 14, 2022 at 05:07 PM UTC
Updated: June 17, 2026 at 04:30 AM UTC
3 products affected across 3 vendorsDebian LinuxRails Html SanitizersRails Html Sanitizers

Using rails-html-sanitizer by rails?

Get instant alerts when new vulnerabilities affect rails-html-sanitizer - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM6.1
Exploit prediction
EPSS 1%

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 1.4.4
Affected range stops below 1.4.4, so it looks safe — our inference, not a vendor statement
v < 1.4.4
Affected range stops below 1.4.4, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet, and no fixed version or vendor advisory is recorded against it.

CVSS

6.1MEDIUMGitHub_M
Attack Vector
NETWORK
Complexity
LOW
Privileges
NONE
User Interaction
REQUIRED
Scope
CHANGED
Confidentiality
LOW
Integrity
LOW
Availability
NONE
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-79

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card