Miggo Logo

CVE-2008-5189:
rails is vulnerable to CRLF injection

5

CVSS Score

Basic Information

EPSS Score
-
Published
10/24/2017
Updated
5/11/2023
KEV Status
No
Technology
TechnologyRuby

Technical Details

CVSS Vector
AV:N/AC:L/Au:N/C:N/I:P/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
railsrubygems< 2.0.52.0.5

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The patch modifies the redirect method in ActionController::Response to add CRLF sanitization. The original code directly used user-controlled 'to_url' parameter for both Location header and response body without filtering. This would appear in runtime traces when processing redirects, as it's the core method handling HTTP redirection logic. The vulnerability manifests here because attackers could inject CRLF sequences to create malicious HTTP headers.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

*RL* inj**tion vuln*r**ility in Ru*y on R*ils ***or* *.*.* *llows r*mot* *tt**k*rs to inj**t *r*itr*ry *TTP *****rs *n* *on*u*t *TTP r*spons* splittin* *tt**ks vi* * *r**t** URL to t** r**ir**t_to *un*tion.

Reasoning

T** p*t** mo*i*i*s t** r**ir**t m*t*o* in **tion*ontroll*r::R*spons* to *** *RL* s*nitiz*tion. T** ori*in*l *o** *ir**tly us** us*r-*ontroll** 'to_url' p*r*m*t*r *or *ot* Lo**tion *****r *n* r*spons* *o*y wit*out *ilt*rin*. T*is woul* *pp**r in runti