CVE-2022-23518

Improper neutralization of data URIs allows XSS in rails-html-sanitizer

MEDIUM
6.1
CVSS Score
Published: December 14, 2022 at 04:22 PM UTC
Updated: June 17, 2026 at 04:30 AM UTC
4 products affected across 4 vendorsDebian LinuxRails Html SanitizersLoofah

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 0.9%

Description

rails-html-sanitizer is responsible for sanitizing HTML fragments in Rails applications. Versions >= 1.0.3, < 1.4.4 are vulnerable to cross-site scripting via data URIs when used in combination with Loofah >= 2.1.0. This issue is patched in version 1.4.4.

Affected

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

2.1.0 ≤ v < 2.19.1
Affected range stops below 2.19.1, so it looks safe — our inference, not a vendor statement
1.0.3 ≤ 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.

References (5)

x_refsource_MISCExploitIssue TrackingThird Party Advisory
https://github.com/rails/rails-html-sanitizer/issues/135
x_refsource_MISCPermissions RequiredThird Party Advisory
https://hackerone.com/reports/1694173
Source: af854a3a-2127-422b-91ae-364da2661108
https://lists.debian.org/debian-lts-announce/2024/09/msg00045.html

CVSS

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