Staging Environment: Content and features may be unstable or change without notice.
Search for vulnerabilities
Vulnerability details: VCID-vs1a-m7ya-rue8
Vulnerability ID VCID-vs1a-m7ya-rue8
Aliases CVE-2014-0081
GHSA-m46p-ggm5-5j83
OSV-103439
Summary Rails vulnerable to Cross-site Scripting There is an XSS vulnerability in the `number_to_currency`, `number_to_percentage` and `number_to_human` helpers in Ruby on Rails. This vulnerability has been assigned the CVE identifier CVE-2014-0081. Versions Affected: All. Fixed Versions: 4.1.0.beta2, 4.0.3, 3.2.17. Impact ------ These helpers allows users to nicely format a numeric value. Some of the parameters to the helper (format, negative_format and units) are not escaped correctly. Applications which pass user controlled data as one of these parameters are vulnerable to an XSS attack. All users passing user controlled data to these parameters of the number helpers should either upgrade or use one of the workarounds immediately. Releases -------- The 4.1.0.rc1, 4.0.3 and 3.2.17 releases are available at the normal locations. Workarounds ----------- The workaround for this issue is to escape the value passed to the parameter. For example, replace code like this: ```ruby <%= number_to_currency(1.02, format: params[:format]) %> ``` With code like this ```ruby <%= number_to_currency(1.02, format: h(params[:format])) %> ``` Patches ------- To aid users who aren't able to upgrade immediately we have provided patches for the two supported release series. They are in git-am format and consist of a single changeset. * 4-1-beta-number_helpers_xss.patch - Patch for 4.1-beta series * 4-0-number_helpers_xss.patch - Patch for 4.0 series * 3-2-number_helpers_xss.patch - Patch for 3.2 series Please note that only the 4.0.x and 3.2.x series are supported at present. Users of earlier unsupported releases are advised to upgrade as soon as possible as we cannot guarantee the continued availability of security fixes for unsupported releases. Credits ------- Thanks to Kevin Reintjes for reporting the issue to us. -- Aaron Patterson http://tenderlovemaking.com/
Status Published
Exploitability None
Weighted Severity None
Risk None
Affected and Fixed Packages Package Details
Weaknesses (3)
Reference id Reference type URL
http://lists.opensuse.org/opensuse-updates/2014-02/msg00081.html
http://openwall.com/lists/oss-security/2014/02/18/8
http://rhn.redhat.com/errata/RHSA-2014-0215.html
http://rhn.redhat.com/errata/RHSA-2014-0306.html
https://access.redhat.com/hydra/rest/securitydata/cve/CVE-2014-0081.json
https://api.first.org/data/v1/epss?cve=CVE-2014-0081
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-0081
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-0082
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-0130
https://github.com/rails/rails
https://github.com/rails/rails/commit/08d0a11a3f62718d601d39e617c834759cf59bbb
https://github.com/rubysec/ruby-advisory-db/blob/master/gems/actionpack/CVE-2014-0081.yml
https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rails/CVE-2014-0081.yml
https://groups.google.com/forum/#!topic/rubyonrails-security/tfp6gZCtzr4
https://nvd.nist.gov/vuln/detail/CVE-2014-0081
https://web.archive.org/web/20140911141416/http://www.securitytracker.com/id/1029782
https://web.archive.org/web/20170307202606/http://www.securityfocus.com/bid/65647
https://web.archive.org/web/20201207045136/https://groups.google.com/forum/message/raw?msg=rubyonrails-security/tfp6gZCtzr4/j8LUHmu7fIEJ
1065520 https://bugzilla.redhat.com/show_bug.cgi?id=1065520
GHSA-m46p-ggm5-5j83 https://github.com/advisories/GHSA-m46p-ggm5-5j83
RHSA-2014:0215 https://access.redhat.com/errata/RHSA-2014:0215
RHSA-2014:0306 https://access.redhat.com/errata/RHSA-2014:0306
No exploits are available.
Exploit Prediction Scoring System (EPSS)
Percentile 0.75766
EPSS Score 0.00885
Published At May 29, 2026, 12:55 p.m.
Date Actor Action Source VulnerableCode Version
2026-05-29T08:57:23.842928+00:00 GithubOSV Importer Import https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2017/10/GHSA-m46p-ggm5-5j83/GHSA-m46p-ggm5-5j83.json 38.6.0