What Is Ruby on Rails?
Ruby on Rails is the most widely used full-stack web framework for the Ruby programming language. It powers a large portion of web applications — including GitHub, Shopify, Basecamp, and many others — and is the default framework for Ruby-based API services, admin panels, and customer-facing applications. Its "convention over configuration" design means many Rails applications rely on implicit, default behavior in routing and rendering, including the implicit render feature at the center of this vulnerability.
Overview
CVE-2014-0130 is a directory traversal vulnerability in Ruby on Rails's implicit-render implementation. When a controller action has no explicit render call, Rails automatically looks up a template whose path is derived from the action name. Because Rails failed to sanitize path components in the resolved template name, an attacker could craft a URL whose action name contained ../ sequences, causing Rails to render arbitrary files on the filesystem — including application configuration files, credential stores, and source code.
Affected Versions
| Rails Version | Vulnerable | Fixed |
|---|---|---|
| 3.x | < 3.2.18 | 3.2.18 |
| 4.0.x | < 4.0.5 | 4.0.5 |
| 4.1.x | < 4.1.1 | 4.1.1 |
| 2.x | All versions (EOL) | No patch — upgrade required |
Technical Details
Root Cause: Missing Path Sanitization in AbstractController
Ruby on Rails controllers typically include an action method that explicitly calls render. If no render call is made, the framework uses implicit rendering: it derives the template filename from the action name and renders it automatically. The vulnerability is in actionpack/lib/abstract_controller/base.rb, where the derived template path was not sanitized for directory traversal sequences.
An attacker could craft a request that maps to an action name like ../../config/database, causing Rails to attempt rendering ../../config/database.yml.erb — resolving to config/database.yml relative to the app root. This file contains database credentials in plaintext.
Example attack request:
GET /users/..%2F..%2Fconfig%2Fdatabase HTTP/1.1
Host: target.example.com
For the traversal to work, the application routing must have a route that maps the action segment, and the target file must exist and be readable by the Rails process. Files that could be exposed include config/database.yml, config/secrets.yml, .env files, or any other plaintext file the web server process can read.
Attack Characteristics
| Attribute | Detail |
|---|---|
| Attack Vector | Network — no authentication required |
| Privileges Required | None |
| User Interaction | None |
| Impact | Arbitrary file read (confidentiality) |
| CWE | CWE-22: Path Traversal |
Discovery
The vulnerability was identified through security research and reported to the Rails security team in early May 2014. The Rails team published a coordinated security advisory on May 6, 2014, releasing patched versions simultaneously.
Exploitation Context
- No authentication required — any remote attacker targeting a vulnerable Rails application is at risk
- Automated scanning tools quickly incorporated this CVE; exploitation was widespread against exposed Rails deployments
- High-value targets include
config/database.yml(database credentials),config/secrets.yml(secret keys for session signing), and.envfiles (API keys, service credentials) - Leaking database credentials can enable a secondary SQL injection or direct database connection attack
- CISA added this to KEV in March 2022, confirming active exploitation continued years after the patch was available
Remediation
-
Upgrade Rails to version 3.2.18, 4.0.5, or 4.1.1 (or later). Verify with
bundle exec rails --versionin the application directory. -
Audit routes for any routes that use catch-all or dynamic action name parameters without explicit rendering — these patterns carry higher risk.
-
Review application logs for path traversal attempts: look for
../or URL-encoded equivalents (%2F,%2e) in action path segments. -
Restrict file system permissions on the Rails process user to limit what files can be read even if a traversal is attempted.
-
If upgrading is not immediately possible: disable implicit rendering for sensitive controllers by adding explicit render calls to all actions.
Key Details
| Property | Value |
|---|---|
| CVE ID | CVE-2014-0130 |
| Vendor / Product | Rails — Ruby on Rails |
| NVD Published | 2014-05-07 |
| NVD Last Modified | 2025-10-22 |
| CVSS 3.1 Score | 7.5 |
| CVSS 3.1 Vector | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| Severity | HIGH |
| CWE | CWE-22 — Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') find similar ↗ |
| CISA KEV Added | 2022-03-25 |
| CISA KEV Deadline | 2022-04-15 |
| Known Ransomware Use | No |
CVSS 3.1 Breakdown
Required Action
Timeline
| Date | Event |
|---|---|
| 2014-05-06 | Rails security advisory published; fixed versions 3.2.18, 4.0.5, and 4.1.1 released |
| 2014-05-07 | CVE-2014-0130 published by NVD |
| 2022-03-25 | Added to CISA Known Exploited Vulnerabilities catalog |
| 2022-04-15 | CISA BOD 22-01 remediation deadline |
References
| Resource | Type |
|---|---|
| NVD — CVE-2014-0130 | Vulnerability Database |
| CISA KEV Catalog Entry | US Government |
| Rails Security Advisory — CVE-2014-0130 (rubyonrails-security mailing list) | Vendor Advisory |
| Rails 3.2.18, 4.0.5, and 4.1.1 Released | Vendor Advisory |