# CVE-2022-23519: Possible XSS vulnerability with certain configurations of rails-html-sanitizer

- Priority: **Prioritise**
- Reason: Public exploit (GitHub, Date unknown)
- Next step: Check applicability and the vendor advisory: no fix release is recorded here
- Status: published
- Published: 2022-12-14 · Modified: 2025-11-03
- Aliases: UBUNTU-CVE-2022-23519, DEBIAN-CVE-2022-23519, GHSA-9h9g-93gc-623h
- Record: https://cvemate.com/vulnerability/CVE-2022-23519 · JSON: https://cvemate.com/vulnerability/CVE-2022-23519/json

## Description

```text
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.
```

## Signals

- CVSS: 7.2 high (v3.1, CVE.org) CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N
- EPSS: 1.076%, percentile 66.118%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 2 (github, reference)

## Affected

- debian ruby-rails-html-sanitizer (Debian): \< 1.4.4-1
- ubuntu ruby-rails-html-sanitizer (Ubuntu): All versions (No fix recorded) \| \< 1.0.3-2ubuntu0.1~esm1 \| \< 1.0.4-1ubuntu0.1~esm1 \| \< 1.3.0-1ubuntu0.1~esm1 \| \< 1.4.2-2ubuntu0.1~esm1
- debian debian\_linux: 10.0
- RubyGems rails-html-sanitizer (RubyGems): \< 1.4.4
- rails rails-html-sanitizer: \< 1.4.4
- rubyonrails rails\_html\_sanitizers: \< 1.4.4

## References

- <https://github.com/rails/rails-html-sanitizer/security/advisories/GHSA-9h9g-93gc-623h>
- <https://hackerone.com/reports/1656627>
- <https://lists.debian.org/debian-lts-announce/2023/09/msg00012.html>
- <https://lists.debian.org/debian-lts-announce/2024/09/msg00045.html>
- <https://ubuntu.com/security/CVE-2022-23519>
- <https://www.cve.org/CVERecord?id=CVE-2022-23519>
- <https://security-tracker.debian.org/tracker/CVE-2022-23519>
- <https://nvd.nist.gov/vuln/detail/CVE-2022-23519>
- <https://github.com/rails/rails-html-sanitizer>
- <https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rails-html-sanitizer/CVE-2022-23519.yml>
- <https://ubuntu.com/security/notices/USN-9438-1>

---

Data as of 2026-12-05T13:12:09.904Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
