Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2019-5420 — Exploit in Rails Development Mode. With some knowledge of a target application it is possible for 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. | Kitploit
Tools/GitHubGitHub/pentestical/cve-2019-5420
Vulnerability AnalysisExploitationWeb Application ExploitationPenetration TestingRed Teaming
GitHubpentestical/cve-2019-5420

CVE-2019-5420

View Repository

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →

About

Exploit in Rails Development Mode. With some knowledge of a target application it is possible for 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.

4 years agoNot yet reviewed
Share

CVE-2019-5420 PoC

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. This PoC code for CVE-2019-5420 escalates the privileges to admin account without the remote code execution itself.

How to use

Copy the value of the cookie and replace it with "VALUE_OF_THE_COOKIE" at line 11:

cookie = CGI.unescape "VALUE_OF_THE_COOKIE" # put in the value of your cookie here

Furthermore, replace "NAME::Application" with the name of your application. For example, if the applications name is "test", it would be "test::Application":

secret = Digest::MD5.hexdigest("NAME::Application") # the name of the ruby on rails application, either bruteforce or have to be known directly

Run the exploit and copy the output of the cookie. Replace it with the cookie of the web application:

ruby CVE-2019-5420.rb

Download Tool