patchminder
Weaponized · Metasploit CVE-2019-5420

Remote code executionin Rails https://github.com/rails/rails.

Published 27 Mar 2019 · Updated 4 Aug 2024 · Every fact sourced

JSONCite
Is it exploited?
Not confirmed

Weaponized: a Metasploit exploit is public.

Attack code is public
Severity
Critical 9.8
CVSSA severity score from 0 to 10. 9 and higher is critical. 3.0 · no login needed
Attack likelihood
Very high
EPSSA daily score from FIRST: the chance a hole is attacked in the next 30 days. 89.3% chance in 30 days · 4 Dec 2026
Fix
Available
Upgrade to 5.2.2.1 or later
In plain words

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.

What to do now
  • Upgrade railties (RubyGems) to 5.2.2.1 or later.
Versions

Affected and fixed versions

Product or package
Affected
Fixed in
Source
https://github.com/rails/rails
5.2.2.1
Not confirmed
CVE record
https://github.com/rails/rails
6.0.0.beta3
Not confirmed
CVE record
railties (RubyGems)
5.2.0 to before 5.2.2.1
5.2.2.1
GitHub advisory

From the CVE record, NVD and package advisories. When no source has versions yet, this table says "not confirmed" instead of guessing.

Timeline

From first report to first attacks

  1. 4 Jan 2019
    CVE ID reserved by hackerone.
  2. 13 Mar 2019
    Metasploit module: Ruby On Rails DoubleTap Development Mode secret_key_base Vulnerability.
  3. 21 Mar 2019
    First public proof of concept on GitHub.
  4. 27 Mar 2019
    Published in the CVE List.
  5. 4 Aug 2024
    CVE record last updated.
Exploit code

Attack code anyone can find

Exploit maturity: Weaponized (Metasploit).

Metasploit module
1 module
Nuclei scan template
None known
Exploit-DB
1 entry
GitHub proof of concepts
12 repositories
Exploit-DBEDB-ID 46785remote exploit for linux, published 2 May 2019, verified by Exploit-DB
GitHubno warning signs foundknqyf263/CVE-2019-54208 stars · created 21 Mar 2019CVE-2019-5420 (Ruby on Rails)
GitHubno warning signs foundj4k0m/CVE-2019-54205 stars · created 6 Sep 2021A vulnerability can allow an attacker to guess the automatically generated development mode secret token.
GitHubno warning signs foundlaffray/ruby-RCE-CVE-2019-5420-5 stars · created 2 Jul 2022Ruby反序列化命令执行漏洞(CVE-2019-5420)-vulfocus通关版
GitHubno warning signs foundscumdestroy/CVE-2019-5420.rb3 stars · created 11 May 2021POC Exploit written in Ruby
GitHubno warning signs foundWildWestCyberSecurity/cve-2019-5420-POC1 stars · created 10 Feb 2025cve-2019-5420 POC simple ruby script
GitHubno warning signs foundcved-sources/cve-2019-54200 stars · created 27 Mar 2019cve-2019-5420
GitHubno warning signs foundAnasTaoutaou/CVE-2019-54200 stars · created 11 Jan 2021
GitHubno warning signs foundEremiel/CVE-2019-54200 stars · created 20 Jan 2021
GitHubno warning signs foundmmeza-developer/CVE-2019-5420-RCE0 stars · created 6 Nov 2021
GitHubno warning signs foundtrickstersec/CVE-2019-54200 stars · created 14 Mar 2022Exploit for the Rails CVE-2019-5420
Referencewww.exploit-db.comnamed as exploit in the CVE record

Listed so defenders can judge how urgent this is and test systems they are authorised to test. Patchminder does not host exploit code; links open the source page. Labels for GitHub repositories come from their public details and are never a promise about the code. Run anything only in an isolated lab.

Related

Other https://github.com/rails/rails vulnerabilities

Same weakness: Command injection

All CWE-77 vulnerabilities

References
Cite this page

Patchminder. CVE-2019-5420: Remote code execution in Rails https://github.com/rails/rails. https://patchminder.com/cve/cve-2019-5420/ (accessed 5 December 2026).