Miggo Logo

CVE-2014-0081:
Rails vulnerable to Cross-site Scripting

4.3

CVSS Score

Basic Information

EPSS Score
0.74452%
Published
10/24/2017
Updated
11/8/2023
KEV Status
No
Technology
TechnologyRuby

Technical Details

CVSS Vector
AV:N/AC:M/Au:N/C:N/I:P/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
railsrubygems>= 3.0.0, < 3.2.173.2.17
railsrubygems>= 4.0.0, < 4.0.34.0.3
actionpackrubygems>= 3.0.0, < 3.2.173.2.17
actionpackrubygems>= 4.0.0, < 4.0.34.0.3

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from unescaped parameters (format, negative_format, units) in Rails' number helpers. The commit diff shows the addition of ERB::Util.html_escape calls for these parameters in the escape_unsafe_options method. Tests in number_helper_test.rb validate XSS mitigation for these exact parameters. The functions are explicitly named in CVE-2014-0081 descriptions and patches, confirming their role in the vulnerability.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

T**r* is *n XSS vuln*r**ility in t** `num**r_to_*urr*n*y`, `num**r_to_p*r**nt***` *n* `num**r_to_*um*n` **lp*rs in Ru*y on R*ils. T*is vuln*r**ility **s ***n *ssi*n** t** *V* i**nti*i*r *V*-****-****. V*rsions *****t**: *ll. *ix** V*rsions: *.*

Reasoning

T** vuln*r**ility st*ms *rom un*s**p** p*r*m*t*rs (*orm*t, n***tiv*_*orm*t, units) in R*ils' num**r **lp*rs. T** *ommit *i** s*ows t** ***ition o* *R*::Util.*tml_*s**p* **lls *or t**s* p*r*m*t*rs in t** *s**p*_uns***_options m*t*o*. T*sts in num**r_*