Rails Ruby on Rails
Ruby on Rails Directory Traversal Vulnerability
Directory traversal vulnerability in Action View in Ruby on Rails before 3.2.22.1, 4.0.x and 4.1.x before 4.1.14.1, 4.2.x before 4.2.5.1, and 5.x before 5.0.0.beta1.1 allows remote attackers to read arbitrary files by leveraging an application's unrestricted use of the render method and providing a .. (dot dot) in a pathname.
Affected versions and mitigation
From the CVE record, GitHub Security Advisories and the vendor's references.Affected
- >= 4.0.0, < 4.1.14.1
Fixed in 4.1.14.1
from GitHub Security Advisory GHSA-xrr4-p6fq-hjg7
- >= 4.2.0, < 4.2.5.1
Fixed in 4.2.5.1
from GitHub Security Advisory GHSA-xrr4-p6fq-hjg7
- >= 4.0.0, < 4.1.14.1
Fixed in 4.1.14.1
from GitHub Security Advisory GHSA-xrr4-p6fq-hjg7
- >= 4.2.0, < 4.2.5.1
Fixed in 4.2.5.1
from GitHub Security Advisory GHSA-xrr4-p6fq-hjg7
- < 3.2.22.1
Fixed in 3.2.22.1
from GitHub Security Advisory GHSA-xrr4-p6fq-hjg7
Mitigation
Upgrade actionview to 4.1.14.1 or later.
Upgrade actionview to 4.2.5.1 or later.
Upgrade actionpack to 4.1.14.1 or later.
Upgrade actionpack to 4.2.5.1 or later.
Upgrade actionpack to 3.2.22.1 or later.
Timeline
Days relative to CVE publicationFirst public PoC 20 days before publication; added to CISA KEV 6.1 years after publication. First PoC: forced-request/rails-rce-cve-2016-0752 (created 26 Jan 2016, found by us: backfilled).
PoC repositories
Found on GitHub.3 PoCs
PoCs 3
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| forced-request/rails-rce-cve-2016-0752 | 26 Jan 2016 −20 d | 10 | PoC |
| dachidahu/CVE-2016-0752 | 18 Mar 2016 +32 d | 0 | PoC |
| julianmunoz/Rails-Dynamic-Render-vuln | 17 Apr 2016 +61 d | 0 | PoC |
Only PoCs count toward the first-PoC date and the characteristics below. Do not run PoC code from unknown sources.
Other public exploits
Exploit-DB, Metasploit and nuclei count as public PoCs. Exploit-tagged references from the CVE record and NVD are links only. None of these are analysed by us.| Source | Title | Published | Found by us |
|---|---|---|---|
| CVE record (tagged exploit) | 40561 | unknown | 14 Nov 2026 |
| Exploit-DB | Ruby on Rails - Dynamic Render File Upload / Remote Code Execution (Metasploit) | 17 Oct 2016 | 14 Nov 2026 |
| Metasploit | Metasploit exploit: Ruby on Rails Dynamic Render File Upload Remote Code Execution (exploit/multi/http/rails_dynamic_render_code_exec) | 10 Oct 2016 | 14 Nov 2026 |
PoC characteristics
What to hunt for in your logs · from 3 PoC reposGET /users/{var}
- Ports
- 80, 3000
- PoC User-Agent
body_markers- Seen in
- 1 repo: dachidahu/CVE-2016-0752
- Evidence
- dachidahu/CVE-2016-0752/config/routes.rb:3 dachidahu/CVE-2016-0752/app/controllers/user_controller.rb:3 dachidahu/CVE-2016-0752/README.md:15
Regex
Generated from PoC characteristics; not yet reviewed. Matches the request path and query.
(?i)^/users/[^/?#]*(?:[?#].*)?$
Suricata
Template generated from PoC characteristics. Review before deploying.
alert http any any -> $HOME_NET [80,3000] (msg:"GG PoC-Monitor CVE-2016-0752 Rails Ruby on Rails exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/users/"; reference:url,poc.griffinguard.io/cve/CVE-2016-0752; classtype:web-application-attack; sid:9788001; rev:1;)
Sigma
Template generated from PoC characteristics. Review before deploying.
title: Rails Ruby on Rails exploit attempt (CVE-2016-0752)
id: gg-pocmon-cve-2016-0752-9788001
status: experimental
description: Request pattern taken from public PoCs for CVE-2016-0752. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2016-0752
logsource:
category: webserver
detection:
selection:
cs-method: GET
cs-uri-stem|contains|all:
- '/users/'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: high
tags:
- attack.initial_access
- attack.t1190
- cve.2016.0752