Miggo Logo

CVE-2020-8185: Untrusted users can run pending migrations in production in Rails

6.5

CVSS Score
3.1

Basic Information

EPSS Score
0.76766%
Published
6/24/2020
Updated
7/5/2023
KEV Status
No
Technology
TechnologyRuby

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
actionpackrubygems>= 6.0.0, <= 6.0.3.16.0.3.2

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from the ActionableExceptions middleware's flawed authorization check. The commit 2121b9d shows the fix changed the conditional from request.show_exceptions? to check show_detailed_exceptions header. This incorrect configuration check allowed attackers to trigger migrations via the actionable exceptions endpoint when show_exceptions was enabled (production default). The middleware's presence and flawed validation logic directly enabled the exploit.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

T**r* is * vuln*r**ility in v*rsions o* R*ils prior to *.*.*.* t**t *llow** *n untrust** us*r to run *ny p*n*in* mi*r*tions on * R*ils *pp runnin* in pro*u*tion. T*is vuln*r**ility **s ***n *ssi*n** t** *V* i**nti*i*r *V*-****-****. V*rsions *****t

Reasoning

T** vuln*r**ility st*ms *rom t** **tion**l**x**ptions mi**l*w*r*'s *l*w** *ut*oriz*tion ****k. T** *ommit ******* s*ows t** *ix ***n*** t** *on*ition*l *rom `r*qu*st.s*ow_*x**ptions?` to ****k `s*ow_**t*il**_*x**ptions` *****r. T*is in*orr**t *on*i*u