CVE-2022-32209
rubygem-rails-html-sanitizer: possible xss with certain configurations
Severity Score
Exploit Likelihood
Affected Versions
Public Exploits
1Exploited in Wild
-Decision
Descriptions
# 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).
# Una Posible vulnerabilidad XSS en Rails::Html::Sanitizer Se presenta una posible vulnerabilidad XSS con determinadas configuraciones de Rails::Html::Sanitizer. Esta vulnerabilidad le ha sido asignada el identificador CVE CVE-2022-32209. Versiones afectadas: TODAS No se han visto afectadas: NONE Versiones Corregidas: v1.4.3## Impacto Una posible vulnerabilidad de tipo XSS con determinadas configuraciones de Rails::Html::Sanitizer puede permitir a un atacante inyectar contenido si el desarrollador de la aplicación ha anulado las etiquetas permitidas del saneador para permitir tanto los elementos "select" como "style". El código sólo está afectado si son anuladas las etiquetas permitidas. Esto puede hacerse por medio de la configuración de la aplicación: ""ruby# En config/application.rbconfig.action_view.sanitized_allowed_tags = ["select", "style"]"" vea https://guides.rubyonrails.org/configuring.html#configuring-action-viewOr puede hacerse con una opción ":tags" al ayudante de la Visualización de Acción "sanitize":""(%= sanitize @comment.body, tags: ["select", "style"] %)"" vea https://api.rubyonrails.org/classes/ActionView/Helpers/SanitizeHelper.html#method-i-sanitizeOr puede hacerse con Rails::Html::SafeListSanitizer directamente:" ruby# class-level optionRails::Html::SafeListSanitizer.allowed_tags = ["select", "style"]"""o"""ruby# instance-level optionRails::Html::SafeListSanitizer.new.sanitize(@article. body, tags: ["select", "style"])"""Todos los usuarios que sobrescriban las etiquetas permitidas por cualquiera de los mecanismos anteriores para incluir tanto "select" como "style" deben actualizar o usar una de las mitigaciones inmediatamente. ## Versiones Las versiones CORREGIDAS están disponibles en las ubicaciones habituales. ## Soluciones Eliminar "select" o "style" de las etiquetas permitidas sobre establecidas. ## Créditos Esta vulnerabilidad fue reportada responsablemente por [windshock](https://hackerone.com/windshock?type=user)
A Cross-site scripting (XSS) vulnerability exists in ruby on rails. This issue could allow an attacker to inject content into the application, leading to loss of integrity and confidentiality.
CVSS Scores
SSVC
- Decision:-
Timeline
- 2022-06-01 CVE Reserved
- 2022-06-24 CVE Published
- 2024-02-02 EPSS Updated
- 2024-08-03 CVE Updated
- 2024-08-03 First Exploit
- ---------- Exploited in Wild
- ---------- KEV Due Date
CWE
- CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
CAPEC
References (6)
URL | Tag | Source |
---|---|---|
https://lists.debian.org/debian-lts-announce/2022/12/msg00012.html | Mailing List |
URL | Date | SRC |
---|---|---|
https://hackerone.com/reports/1530898 | 2024-08-03 |
URL | Date | SRC |
---|
Affected Vendors, Products, and Versions
Vendor | Product | Version | Other | Status | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Vendor | Product | Version | Other | Status | <-- --> | Vendor | Product | Version | Other | Status |
Rubyonrails Search vendor "Rubyonrails" | Rails Html Sanitizers Search vendor "Rubyonrails" for product "Rails Html Sanitizers" | < 1.4.3 Search vendor "Rubyonrails" for product "Rails Html Sanitizers" and version " < 1.4.3" | rails |
Affected
| ||||||
Fedoraproject Search vendor "Fedoraproject" | Fedora Search vendor "Fedoraproject" for product "Fedora" | 35 Search vendor "Fedoraproject" for product "Fedora" and version "35" | - |
Affected
| ||||||
Fedoraproject Search vendor "Fedoraproject" | Fedora Search vendor "Fedoraproject" for product "Fedora" | 36 Search vendor "Fedoraproject" for product "Fedora" and version "36" | - |
Affected
| ||||||
Debian Search vendor "Debian" | Debian Linux Search vendor "Debian" for product "Debian Linux" | 10.0 Search vendor "Debian" for product "Debian Linux" and version "10.0" | - |
Affected
|