Rails https://github.com/rails/rails
Rails Ruby on Rails Path Traversal Vulnerability
There is a File Content Disclosure vulnerability in Action View <5.2.2.1, <5.1.6.2, <5.0.7.2, <4.2.11.1 and v3 where specially crafted accept headers can cause contents of arbitrary files on the target system's filesystem to be exposed.
Affected versions and mitigation
From the CVE record, GitHub Security Advisories and the vendor's references.Affected
- >= 5.2.0, < 5.2.2.1
Fixed in 5.2.2.1
from GitHub Security Advisory GHSA-86g5-2wh3-gc9j
- >= 4.0.0, < 4.2.11.1
Fixed in 4.2.11.1
from GitHub Security Advisory GHSA-86g5-2wh3-gc9j
- >= 5.1.0, < 5.1.6.2
Fixed in 5.1.6.2
from GitHub Security Advisory GHSA-86g5-2wh3-gc9j
- >= 5.0.0, < 5.0.7.2
Fixed in 5.0.7.2
from GitHub Security Advisory GHSA-86g5-2wh3-gc9j
Mitigation
Upgrade actionview to 5.2.2.1 or later.
Upgrade actionview to 4.2.11.1 or later.
Upgrade actionview to 5.1.6.2 or later.
Upgrade actionview to 5.0.7.2 or later.
Timeline
Days relative to CVE publicationFirst public PoC 11 days before publication; added to CISA KEV 6.3 years after publication. First PoC: mpgn/CVE-2019-5418 (created 16 Mar 2019, found by us: backfilled).
PoC repositories
Found on GitHub.11 PoCs · 3 pending
PoCs 11
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| mpgn/CVE-2019-5418 | 16 Mar 2019 −11 d | 201 | PoC |
| omarkurt/CVE-2019-5418 | 18 Mar 2019 −8.9 d | 5 | PoC |
| NotoriousRebel/RailRoadBandit | 19 Mar 2019 −7.6 d | 3 | PoC older repo: PoC date unknown, not used for the first PoC |
| mpgn/Rails-doubletap-RCE | 23 Mar 2019 −4.4 d | 132 | PoC older repo: PoC date unknown, not used for the first PoC |
| ztgrace/CVE-2019-5418-Rails3 | 4 Oct 2019 +191 d | 0 | PoC |
| melardev/CVE-2019-5418 | 24 Oct 2019 +211 d | 0 | PoC |
| random-robbie/CVE-2019-5418 | 19 Nov 2019 +237 d | 5 | PoC |
| kailing0220/CVE-2019-5418 | 17 Oct 2022 +3.6 y | 2 | PoC
Flags · score 30
Below the suspicion threshold (50); does not change the assessment. |
| daehyeok0618/CVE-2019-5418 | 7 Apr 2025 +6.0 y | 0 | PoC via PoC Index |
| CyberCTF/vulhub-rails-cve-2019-5418 | 8 Oct 2026 +7.5 y | 0 | PoC |
| 5t1ck/rails-doubletap-py | 13 Oct 2026 +7.5 y | 0 | PoC via PoC Index |
Pending 3
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| brompwnie/CVE-2019-5418-Scanner | 19 Mar 2019 −7.9 d | 36 | Pending · mkdir /quarantine/brompwnie__CVE-2019-5418-Scanner-09fedf256c7e: permission denied |
| Bad3r/RailroadBandit | 1 Apr 2019 +5.1 d | 3 | Pending · mkdir /quarantine/Bad3r__RailroadBandit-693d9bfd7e6c: permission denied |
| takeokunn/CVE-2019-5418 | unknown | 0 | Pending · repository unavailable (HTTP 404) |
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) | 46585 | unknown | 14 Nov 2026 |
| Exploit-DB | Rails 5.2.1 - Arbitrary File Content Disclosure | 21 Mar 2019 | 14 Nov 2026 |
| Metasploit | Metasploit auxiliary: Ruby On Rails File Content Disclosure ('doubletap') (auxiliary/gather/rails_doubletap_file_read) | unknown | 14 Nov 2026 |
| nuclei template | nuclei template: Rails File Content Disclosure | unknown | 14 Nov 2026 |
| PoC Index | http://www.openwall.com/lists/oss-security/2019/03/22/1 | unknown | 14 Nov 2026 |
PoC characteristics
What to hunt for in your logs · from 11 PoC reposGET /robots
- Key headers
Accept: ../../../../../../../../etc/passwd{{Accept: ../../../../../../etc/passwd{{Accept-Language: en- Ports
- 3000
- PoC User-Agent
Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0)- Seen in
- 2 repos: CyberCTF/vulhub-rails-cve-2019-5418, daehyeok0618/CVE-2019-5418
- Evidence
- CyberCTF/vulhub-rails-cve-2019-5418/app/README.md:35 CyberCTF/vulhub-rails-cve-2019-5418/app/README.zh-cn.md:31 CyberCTF/vulhub-rails-cve-2019-5418/checks/robots.sh:4 daehyeok0618/CVE-2019-5418/README.md:27
GET /shitblock
- Key headers
Accept: diyarbakir_guzel_baglar_delale_lorke <------ CATCHAccept: ../../../../../../../../etc/passwd{{Accept-Language: tr-TR,tr;q=0.8,en-US;q=0.5,en;q=0.3Cache-Control: max-age=0Cookie: firstVisit=1552167456698; CSRF-Token-HOYYT=grQmu9F3Y5hazpvr6T5TtWKj4HqPFhea; sessionid-HOYYT=i3VkCeXtjRJJHUxc7xEEjbecD53xbvaNDnt: 1Upgrade-Insecure-Requests: 1- Ports
- 3000
- PoC User-Agent
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:65.0) Gecko/20100101 Firefox/65.0- Seen in
- 1 repo: omarkurt/CVE-2019-5418
- Evidence
- omarkurt/CVE-2019-5418/README.md:16 omarkurt/CVE-2019-5418/README.md:36
GET /rails/active_storage/disk/{var}/x
- Ports
- 3000, 8080
- Seen in
- 1 repo: 5t1ck/rails-doubletap-py
- Evidence
- 5t1ck/rails-doubletap-py/doubletap.py:322
Regex
Generated from PoC characteristics; not yet reviewed. Matches the request path and query.
(?i)^/robots(?:[?#].*)?$
(?i)^/shitblock(?:[?#].*)?$
(?i)^/rails/active_storage/disk/[^/?#]*/x(?:[?#].*)?$
Suricata
Template generated from PoC characteristics. Review before deploying.
alert http any any -> $HOME_NET [3000] (msg:"GG PoC-Monitor CVE-2019-5418 Rails https://github.com/rails/rails exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/robots"; http.header; content:"Accept: ../../../../../../../../etc/passwd{{"; nocase; http.header; content:"Accept: ../../../../../../etc/passwd{{"; nocase; http.header; content:"Accept-Language: en"; nocase; reference:url,poc.griffinguard.io/cve/CVE-2019-5418; classtype:web-application-attack; sid:9374985; rev:1;)
alert http any any -> $HOME_NET [3000] (msg:"GG PoC-Monitor CVE-2019-5418 Rails https://github.com/rails/rails exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/shitblock"; http.header; content:"Accept: diyarbakir_guzel_baglar_delale_lorke <------ CATCH"; nocase; http.header; content:"Accept: ../../../../../../../../etc/passwd{{"; nocase; http.header; content:"Accept-Language: tr-TR,tr|3b|q=0.8,en-US|3b|q=0.5,en|3b|q=0.3"; nocase; http.header; content:"Cache-Control: max-age=0"; nocase; http.header; content:"Cookie: firstVisit=1552167456698|3b| CSRF-Token-HOYYT=grQmu9F3Y5hazpvr6T5TtWKj4HqPFhea|3b| sessionid-HOYYT=i3VkCeXtjRJJHUxc7xEEjbecD53xbvaN"; nocase; http.header; content:"Dnt: 1"; nocase; http.header; content:"Upgrade-Insecure-Requests: 1"; nocase; reference:url,poc.griffinguard.io/cve/CVE-2019-5418; classtype:web-application-attack; sid:9311715; rev:1;)
alert http any any -> $HOME_NET [3000,8080] (msg:"GG PoC-Monitor CVE-2019-5418 Rails https://github.com/rails/rails exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/rails/active_storage/disk/"; reference:url,poc.griffinguard.io/cve/CVE-2019-5418; classtype:web-application-attack; sid:9108483; rev:1;)
Sigma
Template generated from PoC characteristics. Review before deploying.
title: Rails https://github.com/rails/rails exploit attempt (CVE-2019-5418)
id: gg-pocmon-cve-2019-5418-9374985
status: experimental
description: Request pattern taken from public PoCs for CVE-2019-5418. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2019-5418
logsource:
category: webserver
detection:
selection:
cs-method: GET
cs-uri-stem|contains|all:
- '/robots'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: high
tags:
- attack.initial_access
- attack.t1190
- cve.2019.5418
title: Rails https://github.com/rails/rails exploit attempt (CVE-2019-5418)
id: gg-pocmon-cve-2019-5418-9311715
status: experimental
description: Request pattern taken from public PoCs for CVE-2019-5418. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2019-5418
logsource:
category: webserver
detection:
selection:
cs-method: GET
cs-uri-stem|contains|all:
- '/shitblock'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: high
tags:
- attack.initial_access
- attack.t1190
- cve.2019.5418
title: Rails https://github.com/rails/rails exploit attempt (CVE-2019-5418)
id: gg-pocmon-cve-2019-5418-9108483
status: experimental
description: Request pattern taken from public PoCs for CVE-2019-5418. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2019-5418
logsource:
category: webserver
detection:
selection:
cs-method: GET
cs-uri-stem|contains|all:
- '/rails/active_storage/disk/'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: high
tags:
- attack.initial_access
- attack.t1190
- cve.2019.5418