CVE-2022-23519
MEDIUM 6.1CVSS 3.1Possible XSS vulnerability with certain configurations of rails-html-sanitizer
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.
- Published
- 14 Dec 2022
- Last modified
- 17 Jun 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Modified
- Weakness
- CWE-79
- Also known as
- GHSA-9h9g-93gc-623h
- Sources
- NVDJSONOSV GHSA-9h9g-93gc-623hJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | HIGH 7.2 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | rubyonrails | rails_html_sanitizerscpe:2.3:a:rubyonrails:rails_html_sanitizers:*:*:*:*:*:rails:*:* |
< 1.4.4 | 1.4.4 |
| NVD | debian | debian_linuxcpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:* |
= 10.0 | |
| OSV | RubyGems | rails-html-sanitizer | < 1.4.4 | 1.4.4 |
References
- https://github.com/rails/rails-html-sanitizer/security/advisories/GHSA-9h9g-93gc-623h · Exploit, Third Party Advisory, WEB
- https://hackerone.com/reports/1656627 · Exploit, Third Party Advisory, WEB
- https://lists.debian.org/debian-lts-announce/2023/09/msg00012.html · Mailing List, Third Party Advisory, WEB
- https://lists.debian.org/debian-lts-announce/2024/09/msg00045.html · WEB
- https://nvd.nist.gov/vuln/detail/CVE-2022-23519 · ADVISORY
- https://github.com/rails/rails-html-sanitizer · PACKAGE
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rails-html-sanitizer/CVE-2022-23519.yml · WEB
History
- 25 Nov 2026 20:35 UTC · NVD: first stored (published 14 Dec 2022)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 13 Dec 2022)