Vulnerability · Published Dec 14, 2022 · Assigned by GitHub_M
CVE-2022-23519Possible XSS vulnerability with certain configurations of rails-html-sanitizer
High 7.2
In plain English
A high-severity cross-site scripting in rails-html-sanitizer from rails. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 1.1% (higher than 65% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
rails-html-sanitizer is responsible for sanitizing HTML fragments in Rails applications. Prior to version 1.4.4, a possible XSS vulnerability with certain configurations of Rails::Html::Sanitizer may allow an attacker to inject content if the application developer has overridden the sanitizer's allowed tags in either of the following ways: allow both "math" and "style" elements, or allow both "svg" and "style" elements. Code is only impacted if allowed tags are being overridden. . This issue is fixed in version 1.4.4. All users overriding the allowed tags to include "math" or "svg" and "style" should either upgrade or use the following workaround immediately: Remove "style" from the overridden allowed tags, or remove "math" and "svg" from the overridden allowed tags.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | ruby-rails-html-sanitizer | 1.4.4-1 | DEBIAN-CVE-2022-23519 |
| Debian:13 | ruby-rails-html-sanitizer | 1.4.4-1 | DEBIAN-CVE-2022-23519 |
| Debian:14 | ruby-rails-html-sanitizer | 1.4.4-1 | DEBIAN-CVE-2022-23519 |
| RubyGems | rails-html-sanitizer | 1.4.4 | GHSA-9h9g-93gc-623h |
| Ubuntu:22.04:LTS | ruby-rails-html-sanitizer | no fix listed | UBUNTU-CVE-2022-23519 |
| Ubuntu:24.04:LTS | ruby-rails-html-sanitizer | no fix listed | UBUNTU-CVE-2022-23519 |
| Ubuntu:25.10 | ruby-rails-html-sanitizer | no fix listed | UBUNTU-CVE-2022-23519 |
| Ubuntu:26.04:LTS | ruby-rails-html-sanitizer | no fix listed | UBUNTU-CVE-2022-23519 |
| Ubuntu:26.10 | ruby-rails-html-sanitizer | no fix listed | UBUNTU-CVE-2022-23519 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| rails | rails-html-sanitizer | < 1.4.4 |
Weakness: CWE-79 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N