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-2024-26143

CVE-2024-26143: Ruby on Rails Translation Helper XSS Flaw

CVE-2024-26143 is an XSS vulnerability in Ruby on Rails affecting translation helpers in Action Controller when handling untrusted input. This article covers the technical details, affected versions, and mitigation steps.

Updated: January 22, 2026

CVE-2024-26143 Overview

CVE-2024-26143 is a Cross-Site Scripting (XSS) vulnerability affecting Ruby on Rails applications that use translation helpers in Action Controller. The vulnerability occurs when applications use translation methods like translate or t on a controller with a key ending in _html, combined with a :default key containing untrusted user input, and the resulting string is rendered in a view.

Critical Impact

Attackers can inject malicious scripts into web pages viewed by other users, potentially stealing session cookies, credentials, or performing actions on behalf of authenticated users.

Affected Products

  • Ruby on Rails versions prior to 7.1.3.1
  • Ruby on Rails versions prior to 7.0.8.1
  • Applications using translate or t helpers with _html suffix keys and user-controlled :default values

Discovery Timeline

  • 2024-02-27 - CVE-2024-26143 published to NVD
  • 2025-02-13 - Last updated in NVD database

Technical Details for CVE-2024-26143

Vulnerability Analysis

This Cross-Site Scripting vulnerability resides in the ActionPack component of Ruby on Rails, specifically within the translation helper methods used in controllers. Rails provides internationalization (i18n) support through helper methods like translate and its alias t. When a translation key ends with _html, Rails typically marks the output as HTML-safe, trusting that the translated content is properly sanitized.

The vulnerability arises from a flaw in how the :default parameter is handled. When a translation key is not found and the :default fallback value is used, the HTML-safe marking is incorrectly applied to user-supplied input. This means that if an attacker can control the :default parameter value, they can inject arbitrary JavaScript or HTML that will be rendered without escaping in the application's views.

Root Cause

The root cause is improper input sanitization in the translation helper's handling of the :default fallback mechanism. When using translation keys ending in _html, Rails assumes all content should be marked as HTML-safe. However, the framework failed to properly sanitize or escape the :default parameter before marking it as safe, allowing untrusted user input to bypass Rails' built-in XSS protections.

Attack Vector

The attack requires a network-based approach where an attacker crafts malicious input that gets processed through the translation helper's :default parameter. The attack flow follows this pattern:

  1. The attacker identifies a Rails application using translation helpers with _html suffix keys
  2. The attacker provides malicious JavaScript or HTML content through a user-controllable input that maps to the :default parameter
  3. When the translation key lookup fails, the malicious :default value is used and marked as HTML-safe
  4. The unescaped malicious content is rendered in the view, executing in the victim's browser

The vulnerability requires user interaction (a victim must visit a page containing the malicious payload). The impact includes potential theft of session tokens, credential harvesting, defacement, or performing unauthorized actions on behalf of authenticated users.

Detection Methods for CVE-2024-26143

Indicators of Compromise

  • Unusual translate or t method calls in controller logs with HTML/JavaScript content in parameters
  • Unexpected HTML tags or script elements appearing in application output where translation fallbacks are used
  • Web application firewall (WAF) alerts for XSS patterns in request parameters that map to translation defaults

Detection Strategies

  • Review application code for uses of translate or t methods with keys ending in _html that accept user-controlled :default values
  • Implement static application security testing (SAST) rules to flag vulnerable translation helper patterns in Rails controllers
  • Monitor web server logs for suspicious payloads containing script tags or event handlers in parameters

Monitoring Recommendations

  • Enable detailed logging for Rails i18n translation lookups and fallback usage
  • Deploy a Content Security Policy (CSP) to limit the impact of any successful XSS attacks
  • Implement runtime application self-protection (RASP) to detect and block XSS payload execution

How to Mitigate CVE-2024-26143

Immediate Actions Required

  • Upgrade Ruby on Rails to version 7.1.3.1 or 7.0.8.1 or later immediately
  • Audit all controller code for translation helper usage with _html suffix keys and user-supplied :default values
  • Implement input validation and sanitization for any user-controlled data passed to translation helpers
  • Consider temporarily removing or escaping user-controllable :default parameters until patches are applied

Patch Information

The Ruby on Rails team has released security patches addressing this vulnerability. Organizations should upgrade to the following fixed versions:

  • Rails 7.1.x: Upgrade to 7.1.3.1 or later
  • Rails 7.0.x: Upgrade to 7.0.8.1 or later

Patch commits are available in the Rails GitHub repository. Additional details can be found in the GitHub Security Advisory and the Ruby on Rails Discussion.

Workarounds

  • Manually escape all user-supplied :default values using html_escape or h helper before passing to translation methods
  • Avoid using translation keys ending in _html when the :default parameter may contain user input
  • Implement application-level input sanitization for all user-controllable parameters used in i18n lookups
  • Use a Web Application Firewall (WAF) rule to filter known XSS patterns in request parameters
ruby
# Workaround: Manually escape user input in translation defaults
# Instead of:
# t('missing_key_html', default: user_input)

# Use:
t('missing_key_html', default: h(user_input))

# Or sanitize before use:
sanitized_default = ERB::Util.html_escape(user_input)
t('missing_key_html', default: sanitized_default)

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 Probability1.54%

  • 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
  • RubySec CVE-2024-26143 Advisory

  • NetApp Security Advisory
  • Vendor Resources
  • Ruby on Rails Discussion

  • GitHub Commit Log Entry

  • GitHub Commit Log Entry

  • GitHub Security Advisory
  • Related CVEs
  • CVE-2026-33170: Ruby on Rails Active Support XSS Vulnerability

  • CVE-2022-32209: Rails Html Sanitizers XSS Vulnerability

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

  • CVE-2024-53986: Rails HTML Sanitizer XSS Vulnerability
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