Skip to content
OpenAdvisories
Critical · 9.8 Public exploit CVE-2019-5420 EUVD-2019-0385GHSA-m42h-mh85-4qgc

Use of Insufficiently Random Values in Railties Allows Remote Code Execution

Published Mar 27, 2019 · Updated Aug 4, 2024 · Assigned by hackerone

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

VendorProductAffectedFixed
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.

ReleasePackageFixed inAdvisory
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 —
ReleasePackageFixed inAdvisory
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)
ReleasePackageFixed inAdvisory
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
ReleasePackageFixed inAdvisory
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.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

Metasploit 1 module

Exploit-DB 1

GitHub 12 repositories · most starred shown

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

Affected packages

EcosystemPackageAffectedFixedRecord
RubyGems railties >= 5.2.0, < 5.2.2.1 5.2.2.1 GHSA-m42h-mh85-4qgc

Advisories 7

References