# CVE-2022-23520: rails-html-sanitizer contains an incomplete fix for an XSS vulnerability

- Priority: **Routine**
- Reason: Not severe (CVSS 6.1, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2022-12-14 · Modified: 2025-11-03
- Aliases: UBUNTU-CVE-2022-23520, DEBIAN-CVE-2022-23520, GHSA-rrfc-7g8p-99q8
- Record: https://cvemate.com/vulnerability/CVE-2022-23520 · JSON: https://cvemate.com/vulnerability/CVE-2022-23520/json

## Description

```text
rails-html-sanitizer is responsible for sanitizing HTML fragments in Rails applications. Prior to version 1.4.4, there is a possible XSS vulnerability with certain configurations of Rails::Html::Sanitizer due to an incomplete fix of CVE-2022-32209. Rails::Html::Sanitizer may allow an attacker to inject content if the application developer has overridden the sanitizer's allowed tags to allow both "select" and "style" elements. Code is only impacted if allowed tags are being overridden. This issue is patched in version 1.4.4. All users overriding the allowed tags to include both "select" and "style" should either upgrade or use this workaround: Remove either "select" or "style" from the overridden allowed tags. NOTE: Code is _not_ impacted if allowed tags are overridden using either the :tags option to the Action View helper method sanitize or the :tags option to the instance method SafeListSanitizer#sanitize.
```

## Signals

- CVSS: 6.1 medium (v3.1, CVE.org) CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- EPSS: 1.209%, percentile 69.409%, 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-rrfc-7g8p-99q8>
- <https://hackerone.com/reports/1654310>
- <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-23520>
- <https://www.cve.org/CVERecord?id=CVE-2022-23520>
- <https://security-tracker.debian.org/tracker/CVE-2022-23520>
- <https://nvd.nist.gov/vuln/detail/CVE-2022-23520>
- <https://github.com/rails/rails-html-sanitizer>
- <https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rails-html-sanitizer/CVE-2022-23520.yml>
- <https://ubuntu.com/security/notices/USN-9438-1>

---

Data as of 2026-12-05T13:12:08.911Z. 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
