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-2020-8163

CVE-2020-8163: Ruby on Rails RCE Vulnerability

CVE-2020-8163 is a code injection flaw in Ruby on Rails that enables remote code execution through the render method's locals argument. This article covers the technical details, affected versions, and mitigation.

Published: March 4, 2026

CVE-2020-8163 Overview

CVE-2020-8163 is a code injection vulnerability affecting Ruby on Rails versions prior to 5.0.1. This vulnerability allows an attacker who controls the locals argument of a render call to achieve Remote Code Execution (RCE) on the target system. The flaw stems from insufficient input validation in the Rails rendering mechanism, enabling malicious code to be injected and executed in the context of the web application.

Critical Impact

Attackers can achieve Remote Code Execution by manipulating the locals parameter in render calls, potentially leading to complete system compromise, data theft, and lateral movement within affected infrastructure.

Affected Products

  • Ruby on Rails versions prior to 5.0.1
  • Debian Linux 9.0 (Stretch)
  • Applications using vulnerable Rails rendering functions with user-controllable parameters

Discovery Timeline

  • 2020-07-02 - CVE-2020-8163 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2020-8163

Vulnerability Analysis

This code injection vulnerability exists in the Rails view rendering mechanism. When an application passes user-controllable input to the locals argument of a render call without proper sanitization, an attacker can inject arbitrary Ruby code that gets executed server-side.

The vulnerability is particularly dangerous because the render method is commonly used throughout Rails applications to display templates and partials. Developers may inadvertently pass user input to the locals hash, assuming it would only be used as data for the template. However, due to the way Rails processes these arguments, malicious payloads can escape the intended data context and achieve code execution.

The attack requires network access and low-privilege authentication, but does not require user interaction. Successful exploitation results in complete compromise of confidentiality, integrity, and availability of the affected system.

Root Cause

The root cause of CVE-2020-8163 lies in insufficient input validation and sanitization within the Rails rendering engine. When processing the locals parameter, the framework fails to properly isolate data values from executable code contexts. This allows specially crafted input to break out of the intended data boundary and be interpreted as Ruby code during template rendering.

The vulnerability is classified under CWE-94 (Improper Control of Generation of Code), which describes scenarios where software constructs code segments using externally-influenced input without proper neutralization of special elements that could modify the intended code.

Attack Vector

The attack is executed over the network against Rails applications that expose render calls with user-controllable locals parameters. An attacker identifies endpoints where user input flows into the render method's locals argument, then crafts a malicious payload that escapes the data context and executes arbitrary Ruby code.

The exploitation technique involves injecting Ruby syntax that gets evaluated during template processing. Since Rails applications typically run with significant system privileges, successful exploitation can lead to:

  • Arbitrary command execution on the server
  • Access to sensitive application data and database credentials
  • Modification or deletion of application data
  • Lateral movement to other systems in the network
  • Installation of persistent backdoors

For detailed technical analysis, refer to the HackerOne Report #304805 and the Packet Storm security advisory.

Detection Methods for CVE-2020-8163

Indicators of Compromise

  • Unusual Ruby code patterns appearing in web request parameters, particularly in parameters that feed into render calls
  • Web application logs showing unexpected template rendering errors or Ruby syntax errors
  • Process spawning from the Rails application server (e.g., unexpected shell commands)
  • Outbound network connections from the web server to unknown destinations
  • Evidence of system reconnaissance commands in application logs

Detection Strategies

  • Deploy Web Application Firewall (WAF) rules to detect Ruby code injection patterns in HTTP parameters
  • Implement application-level logging for all render calls with dynamic locals arguments
  • Monitor for anomalous process creation events from Ruby/Rails application processes
  • Use static code analysis tools to identify unsafe render call patterns in application code
  • Deploy runtime application self-protection (RASP) solutions to detect code injection attempts

Monitoring Recommendations

  • Enable verbose logging for Rails applications in production to capture parameter values passed to render calls
  • Set up alerts for Ruby process spawning unexpected child processes
  • Monitor outbound network traffic from web application servers for command-and-control patterns
  • Implement file integrity monitoring on application directories to detect unauthorized modifications
  • Review application logs regularly for failed injection attempts or unusual error patterns

How to Mitigate CVE-2020-8163

Immediate Actions Required

  • Upgrade Ruby on Rails to version 5.0.1 or later immediately
  • Audit application code for render calls that accept user-controllable locals parameters
  • Implement input validation and sanitization for any user data passed to render functions
  • Deploy WAF rules to block common code injection patterns while patches are applied
  • Consider temporarily disabling affected functionality if patching is not immediately possible

Patch Information

The vulnerability has been addressed in Ruby on Rails version 5.0.1 and all subsequent releases. Organizations should upgrade to the latest stable version of Rails to receive this fix along with other security improvements.

For Debian Linux 9.0 users, security updates are available through the standard package management system. Refer to the Debian LTS Security Advisory for specific package versions.

Additional details and discussion can be found in the Ruby on Rails Security Discussion.

Workarounds

  • Never pass user-controllable input directly to the locals argument of render calls
  • Implement a strict allowlist of permitted keys for any user-provided data used in rendering
  • Use Rails Strong Parameters to filter and validate all user input before use in templates
  • Consider using alternative rendering approaches that don't expose the locals injection vector
  • Apply principle of least privilege to the Rails application server process
bash
# Example: Auditing Rails application for vulnerable render patterns
# Search for render calls with dynamic locals in your codebase
grep -rn "render.*locals:" app/controllers/ app/views/
grep -rn "render.*:locals =>" app/controllers/ app/views/

# Review identified instances and ensure locals values are not user-controllable
# If user input must be used, implement strict validation:
# allowed_keys = [:name, :email, :message]
# safe_locals = params.slice(*allowed_keys)

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

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechRubyonrails

  • SeverityHIGH

  • CVSS Score8.8

  • EPSS Probability83.27%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-94
  • Technical References
  • Packet Storm RCE Vulnerability

  • HackerOne Report #304805

  • Debian LTS Security Advisory
  • Vendor Resources
  • Ruby on Rails Security Discussion
  • Related CVEs
  • CVE-2020-8165: Ruby on Rails RCE Vulnerability

  • CVE-2026-33169: Ruby on Rails Active Support DoS Vulnerability

  • CVE-2026-33170: Ruby on Rails Active Support XSS Vulnerability

  • CVE-2026-33173: Rails Active Storage Auth Bypass 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