4.3 Medium
CVSS2
Access Vector
NETWORK
Access Complexity
MEDIUM
Authentication
NONE
Confidentiality Impact
NONE
Integrity Impact
PARTIAL
Availability Impact
NONE
AV:N/AC:M/Au:N/C:N/I:P/A:N
0.002 Low
EPSS
Percentile
58.0%
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.
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.
The 4.1.0.rc1, 4.0.3 and 3.2.17 releases are available at the normal locations.
The workaround for this issue is to escape the value passed to the parameter.
For example, replace code like this:
<%= number_to_currency(1.02, format: params[:format]) %>
With code like this
<%= number_to_currency(1.02, format: h(params[:format])) %>
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.
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.
Thanks to Kevin Reintjes for reporting the issue to us.
–
Aaron Patterson
http://tenderlovemaking.com/
CPE | Name | Operator | Version |
---|---|---|---|
actionpack | eq | 3.1.0.rc2 | |
rails | eq | 3.2.2 | |
rails | eq | 3.2.13.rc1 | |
rails | eq | 3.0.6 | |
actionpack | eq | 3.1.1.rc1 | |
actionpack | eq | 3.2.6 | |
actionpack | eq | 3.2.14.rc2 | |
rails | eq | 3.2.10 | |
rails | eq | 3.0.4 | |
actionpack | eq | 3.0.19 |
lists.opensuse.org/opensuse-updates/2014-02/msg00081.html
openwall.com/lists/oss-security/2014/02/18/8
rhn.redhat.com/errata/RHSA-2014-0215.html
rhn.redhat.com/errata/RHSA-2014-0306.html
github.com/rails/rails
github.com/rails/rails/commit/08d0a11a3f62718d601d39e617c834759cf59bbb
github.com/rubysec/ruby-advisory-db/blob/master/gems/actionpack/CVE-2014-0081.yml
github.com/rubysec/ruby-advisory-db/blob/master/gems/rails/CVE-2014-0081.yml
nvd.nist.gov/vuln/detail/CVE-2014-0081
web.archive.org/web/20140911141416/www.securitytracker.com/id/1029782
web.archive.org/web/20170307202606/www.securityfocus.com/bid/65647
web.archive.org/web/20201207045136/https://groups.google.com/forum/message/raw?msg=rubyonrails-security/tfp6gZCtzr4/j8LUHmu7fIEJ