The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2022-32209

CVE-2022-32209: Rails Html Sanitizers XSS Vulnerability

CVE-2022-32209 is an XSS vulnerability in Rails Html Sanitizers that affects configurations allowing both select and style tags. This article covers the technical details, affected versions, exploitation scenarios, and mitigation.

Published: February 11, 2026

CVE-2022-32209 Overview

CVE-2022-32209 is a Cross-Site Scripting (XSS) vulnerability affecting Rails::Html::Sanitizer, a critical HTML sanitization component used in Ruby on Rails applications. This vulnerability allows attackers to inject malicious content when application developers have configured the sanitizer to allow both select and style HTML elements in the allowed tags list.

The vulnerability affects all versions of Rails::Html::Sanitizer prior to v1.4.3 and requires specific configuration conditions to be exploitable. While the vulnerability requires user interaction and specific application configurations, its potential for content injection makes it a significant security concern for Rails applications with custom sanitizer configurations.

Critical Impact

Attackers can inject arbitrary content through crafted HTML payloads when applications allow both select and style tags in their sanitizer configuration, potentially leading to session hijacking, credential theft, or defacement.

Affected Products

  • RubyOnRails Rails Html Sanitizers (all versions prior to v1.4.3)
  • Fedora Project Fedora 35 and 36
  • Debian Linux 10.0

Discovery Timeline

  • Reported - Vulnerability responsibly reported by windshock via HackerOne
  • 2022-06-24 - CVE-2022-32209 published to NVD
  • 2025-11-03 - Last updated in NVD database

Technical Details for CVE-2022-32209

Vulnerability Analysis

This XSS vulnerability in Rails::Html::Sanitizer arises from an insufficient sanitization bypass when specific HTML elements are whitelisted together. The vulnerability is only exploitable in applications where developers have explicitly overridden the default sanitizer configuration to allow both select and style HTML elements.

The attack requires user interaction as the victim must visit a page containing the malicious content. When exploited, the attacker can execute arbitrary JavaScript in the context of the victim's browser session, potentially accessing sensitive data, session tokens, or performing actions on behalf of the authenticated user.

Root Cause

The root cause lies in how Rails::Html::Sanitizer processes HTML content when both select and style elements are permitted. The sanitizer fails to properly neutralize potentially malicious content when these two specific elements are combined, creating an edge case that bypasses the intended XSS protections. This is classified as CWE-79 (Improper Neutralization of Input During Web Page Generation).

Attack Vector

The vulnerability is exploitable via network-based attacks requiring user interaction. An attacker can craft malicious HTML content that, when processed by the improperly configured sanitizer, allows XSS payload execution. The attack requires:

  1. The target application must have overridden the default sanitizer allowed tags
  2. Both select and style elements must be included in the allowed tags
  3. A victim must interact with the page containing the attacker's crafted content

The configuration override can occur in three ways: through application configuration in config/application.rb, via the :tags option to the Action View sanitize helper, or directly through Rails::Html::SafeListSanitizer at the class or instance level. For detailed configuration examples, see the HackerOne Report #1530898.

Detection Methods for CVE-2022-32209

Indicators of Compromise

  • Unusual HTML content containing both select and style elements in user-submitted data
  • JavaScript execution from unexpected sources within sanitized content areas
  • Web application firewall logs showing attempts to inject styled select elements
  • Client-side errors indicating unexpected script execution in sanitized contexts

Detection Strategies

  • Review application configuration files for overridden sanitizer allowed tags containing both select and style
  • Audit codebase for uses of sanitize helper with custom :tags options
  • Search for Rails::Html::SafeListSanitizer.allowed_tags assignments
  • Monitor for XSS attack patterns in web application logs that combine select and style elements

Monitoring Recommendations

  • Implement Content Security Policy (CSP) headers to detect and prevent unauthorized script execution
  • Enable detailed logging for user input processing in Rails applications
  • Configure web application firewalls to alert on suspicious HTML patterns combining select and style elements
  • Monitor for anomalous user session behavior that may indicate successful XSS exploitation

How to Mitigate CVE-2022-32209

Immediate Actions Required

  • Upgrade Rails::Html::Sanitizer to version 1.4.3 or later immediately
  • Review all application configurations for custom sanitizer allowed tags
  • Remove either select or style from allowed tags if both are present and upgrade is not immediately possible
  • Audit codebase for all instances of sanitizer configuration overrides

Patch Information

The vulnerability is fixed in Rails::Html::Sanitizer version 1.4.3. Users should update their Gemfile to specify the patched version and run bundle update rails-html-sanitizer. Security updates are also available through Fedora and Debian package repositories. For additional details, refer to the Debian LTS Announcement.

Workarounds

  • Remove select from the overridden allowed tags configuration if style functionality is required
  • Remove style from the overridden allowed tags configuration if select elements are required
  • Revert to default sanitizer allowed tags if custom configuration is not strictly necessary
  • Implement additional server-side validation for user-submitted HTML content
bash
# Gemfile update example
# Update rails-html-sanitizer to patched version
bundle update rails-html-sanitizer

# Verify installed version
bundle show rails-html-sanitizer
# Should show version 1.4.3 or later

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeXSS

  • Vendor/TechRubyonrails

  • SeverityMEDIUM

  • CVSS Score6.1

  • EPSS Probability5.48%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityLow
  • AvailabilityNone
  • CWE References
  • CWE-79
  • Technical References
  • HackerOne Report #1530898

  • Debian LTS Announcement December 2022

  • Fedora Package Announcement Archive

  • Fedora Package Announcement Archive

  • Debian LTS Announcement September 2024
  • Related CVEs
  • CVE-2026-33170: Ruby on Rails Active Support XSS Vulnerability

  • CVE-2024-53985: Rails HTML Sanitizer XSS Vulnerability

  • CVE-2024-53986: Rails HTML Sanitizer XSS Vulnerability

  • CVE-2024-26143: Ruby on Rails Translation Helper XSS Flaw
Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English