CVE-2019-5420

CRITICAL

Ruby On Rails DoubleTap Development Mode secret_key_base Vulnerability

Title source: metasploit
STIX 2.1

Exploitation Summary

EIP tracks 14 public exploits for CVE-2019-5420. PoCs published by Metasploit, knqyf263, laffray, including Metasploit module exploits/multi/http/rails_double_tap.

AI-analyzed exploit summary This Metasploit module exploits CVE-2019-5420, a deserialization vulnerability in Ruby on Rails development mode. It retrieves the application name, generates a signed serialized payload, and achieves remote code execution by leveraging the predictable secret_key_base.

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.

Exploits (14)

exploitdb WORKING POC VERIFIED
by Metasploit · rubyremotelinux
https://www.exploit-db.com/exploits/46785

This Metasploit module exploits CVE-2019-5420, a deserialization vulnerability in Ruby on Rails development mode. It retrieves the application name, generates a signed serialized payload, and achieves remote code execution by leveraging the predictable secret_key_base.

Classification
Working Poc 100%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: Ruby on Rails 5.2 and prior (development mode)
No auth needed
Prerequisites: Target must be running in development mode · Access to the Rails application route
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 8 stars
by knqyf263 · poc
https://github.com/knqyf263/CVE-2019-5420

This repository provides a working proof-of-concept exploit for CVE-2019-5420, a deserialization vulnerability in Ruby on Rails. The exploit demonstrates remote code execution (RCE) by executing a command to create a file on the target system.

Classification
Working Poc 95%
Attack Type
Deserialization
Complexity
Moderate
Reliability
Reliable
Target: Ruby on Rails 5.2.2
No auth needed
Prerequisites: Docker environment · Ruby on Rails 5.2.2 application
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 5 stars
by laffray · poc
https://github.com/laffray/ruby-RCE-CVE-2019-5420-

This PoC demonstrates a Ruby deserialization vulnerability (CVE-2019-5420) in Rails applications using ActiveSupport::MessageVerifier and ActiveSupport::MessageEncryptor with Marshal as the default serializer. It exploits object injection to achieve remote code execution (RCE) via a crafted payload.

Classification
Working Poc 90%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: Ruby on Rails 5.2.2
No auth needed
Prerequisites: Ruby 2.6.0 · Rails 5.2.2 · Access to the target server's Active Storage endpoint
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 5 stars
by j4k0m · poc
https://github.com/j4k0m/CVE-2019-5420

This PoC exploits CVE-2019-5420 by deriving the Rails development mode secret token from the application name and decrypting session cookies. It demonstrates the vulnerability by decrypting AES-GCM encrypted session data using the guessed key.

Classification
Working Poc 90%
Attack Type
Info Leak
Complexity
Trivial
Reliability
Reliable
Target: Ruby on Rails (development mode)
No auth needed
Prerequisites: Application name · Session cookie in BASE64 format
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 3 stars
by scumdestroy · poc
https://github.com/scumdestroy/CVE-2019-5420.rb

This Ruby script exploits CVE-2019-5420, a deserialization vulnerability in Rails development mode cookies. It decrypts, modifies, and re-encrypts the cookie to escalate privileges (e.g., setting user_id to 1).

Classification
Working Poc 95%
Attack Type
Deserialization
Complexity
Moderate
Reliability
Reliable
Target: Ruby on Rails (development mode)
Auth required
Prerequisites: Valid Rails development mode cookie · Knowledge of the target Rails application name
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 1 stars
by WildWestCyberSecurity · poc
https://github.com/WildWestCyberSecurity/cve-2019-5420-POC

This PoC exploits CVE-2019-5420, a deserialization vulnerability in Ruby on Rails' ActiveSupport. It crafts a malicious ERB object wrapped in a DeprecatedInstanceVariableProxy, signs it with a derived secret, and achieves remote code execution upon deserialization.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: Ruby on Rails with ActiveSupport (versions before fix)
No auth needed
Prerequisites: Knowledge of the target Rails application name · Vulnerable Rails version
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC
by sealldeveloper · poc
https://github.com/sealldeveloper/CVE-2019-5420-PoC

This PoC exploits CVE-2019-5420, a vulnerability in Rails' encrypted cookie mechanism, allowing decryption and modification of cookie data. It demonstrates how to decrypt, modify, and re-encrypt cookies using AES-GCM.

Classification
Working Poc 95%
Attack Type
Auth Bypass
Complexity
Moderate
Reliability
Reliable
Target: Ruby on Rails (versions affected by CVE-2019-5420)
No auth needed
Prerequisites: Access to an encrypted cookie from the target application · Knowledge of the application name
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec STUB
by cved-sources · poc
https://github.com/cved-sources/cve-2019-5420

This repository is a stub for CVE-2019-5420, referencing external sources for vulnerable Docker containers. It does not contain exploit code or technical details.

Classification
Stub 90%
Attack Type
Other
Complexity
Trivial
Reliability
Theoretical
Target: Rails (version not specified)
No auth needed
Prerequisites: Docker environment
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC
by PenTestical · poc
https://github.com/PenTestical/CVE-2019-5420

This PoC exploits CVE-2019-5420 by decrypting and re-encrypting a Rails cookie to escalate privileges to an admin account. It leverages a known secret generation method in development mode to manipulate the cookie data.

Classification
Working Poc 95%
Attack Type
Auth Bypass
Complexity
Moderate
Reliability
Reliable
Target: Ruby on Rails <5.2.2.1, <6.0.0.beta3 (development mode)
Auth required
Prerequisites: Valid session cookie · Knowledge of the Rails application name
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC
by trickstersec · poc
https://github.com/trickstersec/CVE-2019-5420

This exploit PoC demonstrates an authenticated session tampering vulnerability in Rails (CVE-2019-5420) by decrypting and re-encrypting session cookies to escalate privileges (e.g., changing user_id). It leverages a weak key derivation mechanism in development mode.

Classification
Working Poc 95%
Attack Type
Auth Bypass
Complexity
Moderate
Reliability
Reliable
Target: Ruby on Rails < 5.2.2
Auth required
Prerequisites: Access to a valid session cookie · Knowledge of the application name (e.g., 'PentesterLab')
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC
by mmeza-developer · poc
https://github.com/mmeza-developer/CVE-2019-5420-RCE

This PoC exploits CVE-2019-5420, a deserialization vulnerability in Ruby on Rails. It demonstrates how to decrypt and modify session cookies to achieve remote code execution via crafted marshaled objects.

Classification
Working Poc 95%
Attack Type
Deserialization
Complexity
Moderate
Reliability
Reliable
Target: Ruby on Rails (versions affected by CVE-2019-5420)
No auth needed
Prerequisites: Access to a vulnerable Rails application · Valid encrypted session cookie
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC
by Eremiel · poc
https://github.com/Eremiel/CVE-2019-5420

This PoC exploits CVE-2019-5420 by decrypting and modifying Ruby-on-Rails session cookies in development mode, where the encryption key is derived from the application name. It demonstrates how an attacker can tamper with session data to escalate privileges (e.g., setting user_id to 1).

Classification
Working Poc 90%
Attack Type
Auth Bypass
Complexity
Moderate
Reliability
Reliable
Target: Ruby on Rails < 5.2.2 (development mode)
No auth needed
Prerequisites: Access to a Rails session cookie · Knowledge of the application name
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC
by AnasTaoutaou · poc
https://github.com/AnasTaoutaou/CVE-2019-5420

This PoC demonstrates the decryption of Rails development mode cookies affected by CVE-2019-5420, which allows attackers to forge arbitrary cookies due to weak cryptographic key derivation. The script decrypts and verifies the contents of a provided cookie using AES-GCM.

Classification
Working Poc 90%
Attack Type
Auth Bypass
Complexity
Moderate
Reliability
Reliable
Target: Ruby on Rails <5.2.2.1, <6.0.0.beta3
No auth needed
Prerequisites: Access to a valid cookie from a vulnerable Rails application · Knowledge of the application name used in the cookie encryption
devstral-2 · analyzed Feb 16, 2026 Full analysis →
metasploit WORKING POC EXCELLENT
by ooooooo_q, mpgn, sinn3r · rubypoclinux
https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/multi/http/rails_double_tap.rb

This Metasploit module exploits CVE-2019-5420, a deserialization vulnerability in Ruby on Rails development mode. It extracts the application name (used as secret_key_base) and crafts a signed serialized payload to achieve remote code execution.

Classification
Working Poc 100%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: Ruby on Rails 5.2 and prior (development mode)
No auth needed
Prerequisites: Target must be running Rails in development mode · Access to the Rails application's invalid resource path
devstral-2 · analyzed Feb 16, 2026 Full analysis →

References (5)

Core 5

Scores

CVSS v3 9.8
EPSS 0.9351
EPSS Percentile 99.8%
Attack Vector NETWORK
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Details

CWE
CWE-330 CWE-77
Status published
Products (5)
debian/debian_linux 8.0
fedoraproject/fedora 30
rubygems/railties 5.2.0 - 5.2.2.1RubyGems
rubyonrails/rails 6.0.0 beta1 (2 CPE variants)
rubyonrails/rails < 5.2.2.1
Published Mar 27, 2019
Tracked Since Feb 18, 2026