PT-2022-7453 · Unknown+5 · Rails-Html-Sanitizer+5

0B5Cur17Y

·

Published

2022-12-13

·

Updated

2026-03-13

·

CVE-2022-23519

CVSS v3.1

7.2

High

VectorAV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N
Name of the Vulnerable Software and Affected Versions rails-html-sanitizer versions prior to 1.4.4
Description The issue is related to a possible XSS vulnerability in certain configurations of Rails::Html::Sanitizer, which may allow an attacker to inject content if the application developer has overridden the sanitizer's allowed tags to include both "math" and "style" elements or both "svg" and "style" elements. This can be done in various ways, such as using application configuration, a :tags option to the Action View helper sanitize, using Rails::Html::SafeListSanitizer class method allowed tags=, or using a :tags options to the Rails::Html::SafeListSanitizer instance method sanitize. The vulnerability can be exploited if the code is impacted by overridden allowed tags.
Recommendations For versions prior to 1.4.4, either upgrade to version 1.4.4 or use the following workaround: Remove "style" from the overridden allowed tags, or remove "math" and "svg" from the overridden allowed tags.

Exploit

Fix

XSS

Found an issue in the description? Have something to add? Feel free to write us 👾

Weakness Enumeration

Related Identifiers

ALT-PU-2023-1337
ALT-PU-2023-4269
ALT-PU-2024-7815
BDU:2024-06512
CVE-2022-23519
DLA-3566-1
DLA-3902-1
GHSA-9H9G-93GC-623H
OPENSUSE-SU-2023_3714-1
OPENSUSE-SU-2024:12769-1
OPENSUSE-SU-2024:14175-1
OPENSUSE-SU-2025:15125-1
OPENSUSE-SU-2026:10361-1
RHSA-2023:2097
RLSA-2023:2097
SUSE-SU-2023:3534-1
SUSE-SU-2023:3714-1

Affected Products

Alt Linux
Astra Linux
Red Os
Rocky Linux
Suse
Rails-Html-Sanitizer