CVE-2022-32209Rubyonrails Rails Html Sanitizers
Media 6.1 Sin autenticación
Seguir: esta CVE · Rubyonrails · Rubyonrails Rails Html Sanitizers Te avisamos por email o Slack (requiere cuenta).
- Prioridad
- 52
- CVSS 3.1
- 6.1
- EPSS
- 1.8% probabilidad de explotación en 30 días · percentil 78
- Requiere autenticación
- No
- Publicada
- 24 jun 2022
- Actualizada
- 17 jun 2026
- Categoría
- Aplicación · Multiplataforma
- Debilidad (CWE)
- CWE-79
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Qué pasa
# 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).
Qué hacer
- Aplica la actualización de seguridad del fabricante para Rails Html Sanitizers.
- Se explota sin autenticación: si no puedes parchear ya, limita el acceso desde Internet al servicio afectado.
Paquetes afectados
| Ecosistema | Paquete | Versiones afectadas | Corregida en | Cómo actualizar |
|---|---|---|---|---|
| RubyGems | rails-html-sanitizer |
< 1.4.3 |
1.4.3 |
gem "rails-html-sanitizer", ">= 1.4.3" |
Según OSV / GitHub Advisories (GHSA-pg8v-g4xq-hww9). Verifica la versión en tu lockfile antes de actualizar.
Productos afectados (CPE)
| Fabricante | Producto | Versiones |
|---|---|---|
| rubyonrails | rails_html_sanitizers | < 1.4.3 |
| fedoraproject | fedora | 35 |
| fedoraproject | fedora | 36 |
| debian | debian_linux | 10.0 |
Boletines oficiales
- ruby4.0-rubygem-rails-html-sanitizer-1.6.0-1.9 on GA media · SUSE · openSUSE-SU-2026:10361-1 · 13 mar 2026 Alta
Avisos de fabricantes, CERT y distribuciones que nombran esta CVE. Títulos sin modificar.
Fuentes oficiales
Referencias
Enlaces publicados por las fuentes. Ábrelos con criterio.
- hackerone.com Exploit Third Party Advisory
- lists.debian.org Mailing List Third Party Advisory
- lists.fedoraproject.org Mailing List Third Party Advisory
- lists.fedoraproject.org Mailing List Third Party Advisory
- lists.debian.org