Description
A remote code execution vulnerability in development mode Rails <5.2.2.1, <6.0.0.beta3 can allow an attacker to guess the automatically generated development mode secret token. This secret token can be used in combination with other Rails internals to escalate to a remote code execution exploit.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| Rails | https://github.com/rails/rails | 5.2.2.1, 6.0.0.beta3 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | rails | 2:5.2.2.1+dfsg-1 | — |
| Debian 13 | rails | 2:5.2.2.1+dfsg-1 | — |
| Debian 12 | rails | 2:5.2.2.1+dfsg-1 | — |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 15 SP2 | rmt-server | 2.6.5-3.3.1 | SUSE-SU-2020:3036-1 |
| SLES 15 SP1 | rmt-server | 2.6.5-3.18.1 | SUSE-SU-2020:3160-1 |
| SLES 15 | rmt-server | 2.6.5-3.34.1 | SUSE-SU-2020:3147-1 |
Show 2 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES for SAP 15 | rmt-server | 2.6.5-3.34.1 | SUSE-SU-2020:3147-1 |
| SLE HPC 15 | rmt-server | 2.6.5-3.34.1 | SUSE-SU-2020:3147-1 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | rmt-server | 2.6.13-1.1 | openSUSE-SU-2024:10589-1 |
| openSUSE Leap 15.2 | rmt-server | 2.6.5-lp152.2.3.1 | openSUSE-SU-2020:1993-1 |
| openSUSE Leap 15.1 | rmt-server | 2.6.5-lp151.2.18.2 | openSUSE-SU-2020:2000-1 |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
Metasploit 1 module
-
Ruby On Rails DoubleTap Development Mode secret_key_base Vulnerability
exploit/multi/http/rails_double_tap
Exploit-DB 1
- Ruby On Rails - DoubleTap Development Mode secret_key_base Remote Code Execution (Metasploit) EDB-46785 · remote · May 2, 2019 · verified
GitHub 12 repositories · most starred shown
-
knqyf263/CVE-2019-5420 ★ 8 · Mar 21, 2019
CVE-2019-5420 (Ruby on Rails)
-
laffray/ruby-RCE-CVE-2019-5420- ★ 5 · Jul 2, 2022
Ruby反序列化命令执行漏洞(CVE-2019-5420)-vulfocus通关版
-
j4k0m/CVE-2019-5420 ★ 5 · Sep 6, 2021
A vulnerability can allow an attacker to guess the automatically generated development mode secret token.
-
scumdestroy/CVE-2019-5420.rb ★ 3 · May 11, 2021
POC Exploit written in Ruby
-
WildWestCyberSecurity/cve-2019-5420-POC ★ 1 · Feb 10, 2025
cve-2019-5420 POC simple ruby script
-
trickstersec/CVE-2019-5420 ★ 0 · Mar 14, 2022
Exploit for the Rails CVE-2019-5420
-
mmeza-developer/CVE-2019-5420-RCE ★ 0 · Nov 6, 2021
-
Eremiel/CVE-2019-5420 ★ 0 · Jan 20, 2021
-
AnasTaoutaou/CVE-2019-5420 ★ 0 · Jan 11, 2021
-
cved-sources/cve-2019-5420 ★ 0 · Mar 27, 2019
cve-2019-5420
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| RubyGems | railties | >= 5.2.0, < 5.2.2.1 | 5.2.2.1 | GHSA-m42h-mh85-4qgc |
Advisories 7
- SUSE-SU-2020:3160-1 Security update for rmt-server SUSE / openSUSE Security Updates · Feb 4, 2026
- openSUSE-SU-2020:1993-1 Security update for rmt-server SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2020:3036-1 Security update for rmt-server SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2020:3147-1 Security update for rmt-server SUSE / openSUSE Security Updates · Feb 4, 2026
- openSUSE-SU-2020:2000-1 Security update for rmt-server SUSE / openSUSE Security Updates · Feb 4, 2026
- openSUSE-SU-2024:10589-1 rmt-server-2.6.13-1.1 on GA media SUSE / openSUSE Security Updates · Feb 4, 2026
- WID-SEC-2025-1467 Ruby on Rails: Mehrere Schwachstellen BSI CERT-Bund (WID) · Jul 17, 2025
References
- https://weblog.rubyonrails.org/2019/3/13/Rails-4-2-5-1-5-1-6-2-have-been-released/
- https://groups.google.com/forum/#%21topic/rubyonrails-security/IsQKvDqZdKw
- http://packetstormsecurity.com/files/152704/Ruby-On-Rails-DoubleTap-Development-Mode-secret_key_base-Remote-Code-Execution.html
- 46785 exploit
- FEDORA-2019-1cfe24db5c vendor-advisory