# CVE-2022-32209: ruby-rails-html-sanitizer: # Possible XSS Vulnerability in Rails::Html::SanitizerThere is a possible XSS vulnerability with certain configuratio...

CVE-2022-32209 is fixed in 2 products on 1 platform, first by DEBIAN-CVE-2022-32209, released June 24, 2022. It is not reported as exploited. Patch Radar priority: Routine.

- Web page: https://patchblox.com/security/cve/CVE-2022-32209
- Priority: Routine
- CVSS: 6.1 (medium)
- EPSS: 0.2650
- CISA KEV: not listed
- Exploited (vendor report): no
- Publicly disclosed: no
- Published: Jun 24, 2022

## Description

# Possible XSS Vulnerability in Rails::Html::SanitizerThere is a possible XSS vulnerability with certain configurations of Rails::Html::Sanitizer.This vulnerability has been assigned the CVE identifier CVE-2022-32209.Versions Affected: ALLNot affected: NONEFixed Versions: v1.4.3## ImpactA 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 to allow both `select` and `style` elements.Code is only impacted if allowed tags are being overridden. This may be done via application configuration:```ruby# In config/application.rbconfig.action_view.sanitized_allowed_tags = ["select", "style"]```see https://guides.rubyonrails.org/configuring.html#configuring-action-viewOr it may be done with a `:tags` option to the Action View helper `sanitize`:```<%= sanitize @comment.body, tags: ["select", "style"] %>```see https://api.rubyonrails.org/classes/ActionView/Helpers/SanitizeHelper.html#method-i-sanitizeOr it may be done with Rails::Html::SafeListSanitizer directly:```ruby# class-level optionRails::Html::SafeListSanitizer.allowed_tags = ["select", "style"]```or```ruby# instance-level optionRails::Html::SafeListSanitizer.new.sanitize(@article.body, tags: ["select", "style"])```All users overriding the allowed tags by any of the above mechanisms to include both "select" and "style" should either upgrade or use one of the workarounds immediately.## ReleasesThe FIXED releases are available at the normal locations.## WorkaroundsRemove either `select` or `style` from the overridden allowed tags.## CreditsThis vulnerability was responsibly reported by [windshock](https://hackerone.com/windshock?type=user).

## Where it's fixed

| Platform | Product | Fixed in | Fix | Released |
|---|---|---|---|---|
| Linux | libdb rocky 8 | 0:5.3.28-42.el8_4 | [RLSA-2022:8506](https://patchblox.com/security/data/fix/linux/rlsa-2022-8506.md) | Nov 16, 2022 |
| Linux | ruby-rails-html-sanitizer Debian 12.15 (bookworm) | 1.4.3-0.1 | [DEBIAN-CVE-2022-32209](https://patchblox.com/security/data/fix/linux/debian-cve-2022-32209.md) | Jun 24, 2022 |
| Linux | ruby-rails-html-sanitizer Debian 13.5 (trixie) | 1.4.3-0.1 | [DEBIAN-CVE-2022-32209](https://patchblox.com/security/data/fix/linux/debian-cve-2022-32209.md) | Jun 24, 2022 |
| Linux | ruby-rails-html-sanitizer Debian 14 | 1.4.3-0.1 | [DEBIAN-CVE-2022-32209](https://patchblox.com/security/data/fix/linux/debian-cve-2022-32209.md) | Jun 24, 2022 |

---

Data as of 2026-11-08T06:59:42Z UTC. Source: Patchblox Patch Radar (https://patchblox.com/security/patch-radar). Patchblox finds out-of-date software on Windows, macOS and Linux and updates it through release rings: https://patchblox.com/demo

Free to use with attribution: show "Data: Patchblox Patch Radar" with a link to https://patchblox.com/security/patch-radar. Terms, including what needs a written agreement: https://patchblox.com/security/patch-radar/use-the-data

Product names, logos and trademarks shown on Patch Radar belong to their respective owners. They are used only to identify the software each security fix applies to and to help readers find their platform. Their use does not imply any affiliation with, or endorsement by, those owners, and Patchblox is not affiliated with any of them.
