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
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • 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-2023-28362

CVE-2023-28362: Rails redirect_to Header Vulnerability

CVE-2023-28362 is a header injection flaw in Ruby on Rails redirect_to method that allows illegal characters in HTTP headers, potentially causing downstream services to remove Location headers. This article covers the technical details, affected versions, security impact, and available mitigation strategies.

Published: February 4, 2026

CVE-2023-28362 Overview

CVE-2023-28362 is an Improper Input Validation vulnerability affecting the redirect_to method in Ruby on Rails. The vulnerability allows user-supplied values containing illegal characters (not permitted in HTTP header values per RFC specifications) to be accepted and used in redirect operations. When downstream services enforce strict RFC compliance on HTTP response headers, the assigned Location header may be stripped, potentially leading to unexpected behavior or security issues such as possible Cross-Site Scripting (XSS).

Critical Impact

User-supplied values containing illegal HTTP header characters can bypass input validation in the redirect_to method, potentially enabling XSS attacks or causing redirect failures when RFC-compliant proxies strip malformed headers.

Affected Products

  • Ruby on Rails (ActionPack component)
  • Applications using the redirect_to controller method
  • Systems with RFC-compliant downstream proxies or load balancers

Discovery Timeline

  • 2025-01-09 - CVE CVE-2023-28362 published to NVD
  • 2025-05-02 - Last updated in NVD database

Technical Details for CVE-2023-28362

Vulnerability Analysis

This vulnerability stems from improper encoding of output (CWE-116) in the Rails ActionPack component. The redirect_to method, which is commonly used to redirect users to different URLs within Rails applications, failed to properly validate and sanitize input values before using them in HTTP Location headers.

HTTP headers have strict requirements defined by RFC specifications regarding which characters are permitted. Control characters in the range \\x00-\\x08 and \\x0A-\\x1F are not legal in HTTP header values. When an attacker supplies input containing these illegal characters, the behavior depends on how downstream services handle the malformed headers. RFC-compliant proxies, load balancers, or WAFs may strip the Location header entirely, while less strict services may pass the malformed header through, potentially enabling XSS attacks.

The vulnerability requires local access and no privileges or user interaction to exploit, though it only impacts integrity without affecting confidentiality or availability.

Root Cause

The root cause lies in the redirect_to method within actionpack/lib/action_controller/metal/redirecting.rb lacking validation for illegal HTTP header characters. Before the patch, user-supplied values were passed directly to the Location header without checking for control characters that violate RFC specifications for HTTP headers.

Attack Vector

An attacker can exploit this vulnerability by providing specially crafted input containing control characters (bytes in the \\x00-\\x08 or \\x0A-\\x1F ranges) to any application endpoint that uses the redirect_to method with user-controllable values. This could be achieved through URL parameters, form inputs, or any other user-supplied data that gets passed to redirect_to.

When processed by RFC-compliant downstream services, the malformed Location header may be removed, causing the redirect to fail or behave unexpectedly. In certain configurations, this could also enable XSS attacks if the malformed header content is reflected in error pages.

ruby
# Security patch adding illegal header value detection
# Source: https://github.com/rails/rails/commit/1c3f93d1e90a3475f9ae2377ead25ccf11f71441

     include AbstractController::Logger
     include ActionController::UrlFor
 
+    ILLEGAL_HEADER_VALUE_REGEX = /[\\x00-\\x08\\x0A-\\x1F]/.freeze
+
+    class UnsafeRedirectError < StandardError; end
+
     # Redirects the browser to the target specified in +options+. This parameter can be any one of:
     #
     # * <tt>Hash</tt> - The URL will be generated by calling url_for with the +options+.

The patch introduces ILLEGAL_HEADER_VALUE_REGEX to detect control characters and raises an UnsafeRedirectError when illegal values are detected, preventing the malformed header from being sent.

Detection Methods for CVE-2023-28362

Indicators of Compromise

  • HTTP requests containing control characters (\\x00-\\x08, \\x0A-\\x1F) in parameters used for redirects
  • Application logs showing unexpected redirect failures or stripped Location headers
  • Error responses where redirects should have occurred, particularly from RFC-compliant proxies
  • XSS-related alerts triggered by redirect functionality

Detection Strategies

  • Monitor web application logs for requests containing non-printable ASCII characters in redirect-related parameters
  • Deploy WAF rules to detect and block requests with control characters in URL parameters and form data
  • Review proxy and load balancer logs for stripped or modified Location headers
  • Implement application-level logging for redirect_to calls with suspicious input patterns

Monitoring Recommendations

  • Enable verbose logging on Rails applications to capture redirect operations and their input values
  • Configure security monitoring tools to alert on HTTP header manipulation attempts
  • Audit application code for redirect_to calls that accept user-controllable input
  • Monitor for UnsafeRedirectError exceptions after applying the security patch

How to Mitigate CVE-2023-28362

Immediate Actions Required

  • Upgrade Ruby on Rails to the latest patched version that includes the security fix
  • Review application code for all uses of redirect_to with user-supplied input
  • Implement input validation at the application layer to reject control characters before they reach redirect_to
  • Deploy WAF rules to block requests containing illegal HTTP header characters

Patch Information

The vulnerability has been addressed in Rails security patches. The fix adds the ILLEGAL_HEADER_VALUE_REGEX constant to detect control characters and introduces an UnsafeRedirectError exception that is raised when illegal values are detected. Updates are available through the official Rails repository. For detailed patch information, see the Ruby on Rails Discussion and the GitHub Security Advisory.

Workarounds

  • Implement custom input sanitization to strip or reject control characters before passing values to redirect_to
  • Use allowlist validation for redirect targets, only permitting known safe URLs
  • Deploy a reverse proxy or WAF configured to reject requests with illegal header characters
  • Consider using url_for with strict parameter validation instead of directly passing user input to redirect_to
ruby
# Input sanitization workaround for redirect_to
# Strip illegal HTTP header characters before redirecting

def safe_redirect_to(url)
  sanitized_url = url.to_s.gsub(/[\\x00-\\x08\\x0A-\\x1F]/, '')
  redirect_to sanitized_url
end

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

  • Vulnerability Details
  • TypeOther

  • Vendor/TechRails

  • SeverityMEDIUM

  • CVSS Score4.0

  • EPSS Probability0.17%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-116
  • Technical References
  • Ruby on Rails Discussion

  • GitHub Security Advisory

  • Rails Commit Update

  • Rails Commit Update

  • NetApp Security Advisory
  • Related CVEs
  • CVE-2026-33658: Rails Active Storage DoS Vulnerability

  • CVE-2026-33168: Rails Action View XSS Vulnerability

  • CVE-2023-38037: ActiveSupport Information Disclosure Flaw
Default Legacy - Prefooter | 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