CVE-2022-23518
Improper neutralization of data URIs allows XSS in rails-html-sanitizer
- State
- Published
- Severity
- 6.1 Medium
- Published
- Dec 14, 2022
- Updated
- Nov 3, 2025
- Reserved
- Jan 19, 2022
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.
Scores
| CVSS | Score | Vector | Source |
|---|---|---|---|
| 3.0 | 6.1 Medium | CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N | GitHub_M |
Weaknesses
- CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Products
| Product | Versions |
|---|---|
rails-html-sanitizerrails |
|
References
- https://github.com/rails/rails-html-sanitizer/security/advisories/GHSA-mcvf-2q2m-x72m
- https://github.com/rails/rails-html-sanitizer/issues/135
- https://hackerone.com/reports/1694173
- https://lists.debian.org/debian-lts-announce/2023/09/msg00012.html
- https://lists.debian.org/debian-lts-announce/2024/09/msg00045.html
Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.