CVE-2014-0081
Rails vulnerable to Cross-site Scripting
CVE-2014-0081 is a medium vulnerability (CVSS 4.3) in Rubyonrails Rails, published February 20, 2014. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 4.03%, the 90th percentile. Fixed in rails 3.2.17.
Multiple cross-site scripting (XSS) vulnerabilities in actionview/lib/action_view/helpers/number_helper.rb in Ruby on Rails before 3.2.17, 4.0.x before 4.0.3, and 4.1.x before 4.1.0.beta2 allow remote attackers to inject arbitrary web script or HTML via the (1) format, (2) negative_format, or (3) units parameter to the (a) number_to_currency, (b) number_to_percentage, or (c) number_to_human helper.
Exploit likelihood
What each source reports
NVD Score used
4.3
Multiple cross-site scripting (XSS) vulnerabilities in actionview/lib/action_view/helpers/number_helper.rb in Ruby on Rails before 3.2.17, 4.0.x before 4.0.3, and 4.1.x before 4.1.0.beta2 allow remote attackers to inject arbitrary web script or HTML via the (1) format, (2) negative_format, or (3) units parameter to the (a) number_to_currency, (b) number_to_percentage, or (c) number_to_human helper.
- Record
CVE-2014-0081- CVSS 2.0
- 4.3 Medium
AV:N/AC:M/Au:N/C:N/I:P/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
CVE List No score
Multiple cross-site scripting (XSS) vulnerabilities in actionview/lib/action_view/helpers/number_helper.rb in Ruby on Rails before 3.2.17, 4.0.x before 4.0.3, and 4.1.x before 4.1.0.beta2 allow remote attackers to inject arbitrary web script or HTML via the (1) format, (2) negative_format, or (3) units parameter to the (a) number_to_currency, (b) number_to_percentage, or (c) number_to_human helper.
- Record
CVE-2014-0081- Updated
- 2026-11-02
EUVDEUVD-2017-0269 No score
Multiple cross-site scripting (XSS) vulnerabilities in actionview/lib/action_view/helpers/number_helper.rb in Ruby on Rails before 3.2.17, 4.0.x before 4.0.3, and 4.1.x before 4.1.0.beta2 allow remote attackers to inject arbitrary web script or HTML via the (1) format, (2) negative_format, or (3) units parameter to the (a) number_to_currency, (b) number_to_percentage, or (c) number_to_human helper.
- Record
EUVD-2017-0269- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-m46p-ggm5-5j83 No score
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:
<%= number_to_currency(1.02, format: params[:format]) %>
With code like this
<%= 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/
- Record
GHSA-m46p-ggm5-5j83- Weakness
- CWE-79
- Updated
- 2026-11-02
OSV No score
Multiple cross-site scripting (XSS) vulnerabilities in actionview/lib/action_view/helpers/number_helper.rb in Ruby on Rails before 3.2.17, 4.0.x before 4.0.3, and 4.1.x before 4.1.0.beta2 allow remote attackers to inject arbitrary web script or HTML via the (1) format, (2) negative_format, or (3) units parameter to the (a) number_to_currency, (b) number_to_percentage, or (c) number_to_human helper.
- Record
CVE-2014-0081- Updated
- 2026-11-02
OSVDEBIAN-CVE-2014-0081 No score
Multiple cross-site scripting (XSS) vulnerabilities in actionview/lib/action_view/helpers/number_helper.rb in Ruby on Rails before 3.2.17, 4.0.x before 4.0.3, and 4.1.x before 4.1.0.beta2 allow remote attackers to inject arbitrary web script or HTML via the (1) format, (2) negative_format, or (3) units parameter to the (a) number_to_currency, (b) number_to_percentage, or (c) number_to_human helper.
- Record
DEBIAN-CVE-2014-0081- Updated
- 2026-11-02
OSVGHSA-m46p-ggm5-5j83 No score
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:
<%= number_to_currency(1.02, format: params[:format]) %>
With code like this
<%= 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/
- Record
GHSA-m46p-ggm5-5j83- Weakness
- CWE-79
- Updated
- 2026-11-02
OSVMGASA-2014-0191 No score
Updated ruby-rails and associated packages fix multiple vulnerabilities
Updated ruby-activerecord and ruby-actionpack packages fix security vulnerabilities:
There is a data injection vulnerability in Active Record. Specially crafted strings can be used to save data in PostgreSQL array columns that may not be intended (CVE-2014-0080).
There is an XSS vulnerability in the number_to_currency, number_to_percentage and number_to_human helpers in Ruby on Rails (CVE-2014-0081).
The associated packages have been updated to version 4.0.3 to fix these issues.
- Record
MGASA-2014-0191- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
railsRubyGems |
3.0.0 up to 3.2.17 | 3.2.17 |
railsRubyGems |
4.0.0 up to 4.0.3 | 4.0.3 |
actionpackRubyGems |
3.0.0 up to 3.2.17 | 3.2.17 |
actionpackRubyGems |
4.0.0 up to 4.0.3 | 4.0.3 |
railsDebian:12 |
before 2.3.14.1 | 2.3.14.1 |
railsDebian:13 |
before 2.3.14.1 | 2.3.14.1 |
railsDebian:14 |
before 2.3.14.1 | 2.3.14.1 |
ruby-actionpack-3.2Debian:7 |
before 3.2.6-6+deb7u2, plus listed versions 3.2.6-63.2.6-6+deb7u1 |
3.2.6-6+deb7u2 |
railsRubyGems |
3.0.0 up to 3.2.17, plus listed versions 3.0.13.0.103.0.10.rc13.0.113.0.12 Show 45 moreShow less3.0.12.rc13.0.133.0.13.rc13.0.143.0.153.0.163.0.173.0.183.0.193.0.23.0.203.0.33.0.43.0.4.rc13.0.53.0.5.rc13.0.63.0.6.rc13.0.6.rc23.0.73.0.7.rc13.0.7.rc23.0.83.0.8.rc13.0.8.rc23.0.8.rc43.0.93.0.9.rc13.0.9.rc33.0.9.rc43.0.9.rc53.1.03.1.0.beta13.1.0.rc13.1.0.rc23.1.0.rc33.1.0.rc43.1.0.rc53.1.0.rc63.1.0.rc83.1.13.1.1.rc13.1.1.rc23.1.1.rc33.1.10 |
3.2.17 |
railsRubyGems |
4.0.0 up to 4.0.3, plus listed versions 4.0.14.0.1.rc14.0.1.rc24.0.1.rc34.0.1.rc44.0.2 |
4.0.3 |
Show 37 moreShow less
| Package | Affected | Fixed |
|---|---|---|
actionpackRubyGems |
3.0.0 up to 3.2.17, plus listed versions 3.0.13.0.103.0.10.rc13.0.113.0.12 Show 45 moreShow less3.0.12.rc13.0.133.0.13.rc13.0.143.0.153.0.163.0.173.0.183.0.193.0.23.0.203.0.33.0.43.0.4.rc13.0.53.0.5.rc13.0.63.0.6.rc13.0.6.rc23.0.73.0.7.rc13.0.7.rc23.0.83.0.8.rc13.0.8.rc23.0.8.rc43.0.93.0.9.rc13.0.9.rc33.0.9.rc43.0.9.rc53.1.03.1.0.beta13.1.0.rc13.1.0.rc23.1.0.rc33.1.0.rc43.1.0.rc53.1.0.rc63.1.0.rc83.1.13.1.1.rc13.1.1.rc23.1.1.rc33.1.10 |
3.2.17 |
actionpackRubyGems |
4.0.0 up to 4.0.3, plus listed versions 4.0.14.0.1.rc14.0.1.rc24.0.1.rc34.0.1.rc44.0.2 |
4.0.3 |
ruby-actionmailerMageia:4 |
before 4.0.3-1.mga4 | 4.0.3-1.mga4 |
ruby-actionpackMageia:4 |
before 4.0.3-1.mga4 | 4.0.3-1.mga4 |
ruby-activemodelMageia:4 |
before 4.0.3-1.mga4 | 4.0.3-1.mga4 |
ruby-activerecordMageia:4 |
before 4.0.3-1.mga4 | 4.0.3-1.mga4 |
ruby-activesupportMageia:4 |
before 4.0.3-1.mga4 | 4.0.3-1.mga4 |
ruby-railsMageia:4 |
before 4.0.3-1.mga4 | 4.0.3-1.mga4 |
ruby-railtiesMageia:4 |
before 4.0.3-1.mga4 | 4.0.3-1.mga4 |
cfmeRed Hat:cloudforms_managementengine:5::el6 |
before 0:5.2.2.3-1.el6cf | 0:5.2.2.3-1.el6cf |
cfme-applianceRed Hat:cloudforms_managementengine:5::el6 |
before 0:5.2.2.3-1.el6cf | 0:5.2.2.3-1.el6cf |
cfme-debuginfoRed Hat:cloudforms_managementengine:5::el6 |
before 0:5.2.2.3-1.el6cf | 0:5.2.2.3-1.el6cf |
cfme-libRed Hat:cloudforms_managementengine:5::el6 |
before 0:5.2.2.3-1.el6cf | 0:5.2.2.3-1.el6cf |
mingw32-cfme-hostRed Hat:cloudforms_managementengine:5::el6 |
before 0:5.2.2.3-1.el6cf | 0:5.2.2.3-1.el6cf |
ruby193-rubyRed Hat:cloudforms_managementengine:5::el6 |
before 0:1.9.3.448-40.1.el6 | 0:1.9.3.448-40.1.el6 |
ruby193-ruby-debuginfoRed Hat:cloudforms_managementengine:5::el6 |
before 0:1.9.3.448-40.1.el6 | 0:1.9.3.448-40.1.el6 |
ruby193-ruby-develRed Hat:cloudforms_managementengine:5::el6 |
before 0:1.9.3.448-40.1.el6 | 0:1.9.3.448-40.1.el6 |
ruby193-ruby-irbRed Hat:cloudforms_managementengine:5::el6 |
before 0:1.9.3.448-40.1.el6 | 0:1.9.3.448-40.1.el6 |
ruby193-ruby-libsRed Hat:cloudforms_managementengine:5::el6 |
before 0:1.9.3.448-40.1.el6 | 0:1.9.3.448-40.1.el6 |
ruby193-ruby-tcltkRed Hat:cloudforms_managementengine:5::el6 |
before 0:1.9.3.448-40.1.el6 | 0:1.9.3.448-40.1.el6 |
ruby193-rubygem-actionpackRed Hat:cloudforms_managementengine:5::el6 |
before 1:3.2.13-5.el6cf | 1:3.2.13-5.el6cf |
ruby193-rubygem-amq-protocolRed Hat:cloudforms_managementengine:5::el6 |
before 0:1.9.2-3.el6cf | 0:1.9.2-3.el6cf |
ruby193-rubygem-amq-protocol-docRed Hat:cloudforms_managementengine:5::el6 |
before 0:1.9.2-3.el6cf | 0:1.9.2-3.el6cf |
ruby193-rubygem-bigdecimalRed Hat:cloudforms_managementengine:5::el6 |
before 0:1.1.0-40.1.el6 | 0:1.1.0-40.1.el6 |
ruby193-rubygem-bunnyRed Hat:cloudforms_managementengine:5::el6 |
before 0:1.0.7-1.el6cf | 0:1.0.7-1.el6cf |
ruby193-rubygem-bunny-docRed Hat:cloudforms_managementengine:5::el6 |
before 0:1.0.7-1.el6cf | 0:1.0.7-1.el6cf |
ruby193-rubygem-exconRed Hat:cloudforms_managementengine:5::el6 |
before 0:0.31.0-1.el6cf | 0:0.31.0-1.el6cf |
ruby193-rubygem-fogRed Hat:cloudforms_managementengine:5::el6 |
before 0:1.19.0-1.el6cf | 0:1.19.0-1.el6cf |
ruby193-rubygem-io-consoleRed Hat:cloudforms_managementengine:5::el6 |
before 0:0.3-40.1.el6 | 0:0.3-40.1.el6 |
ruby193-rubygem-linux_adminRed Hat:cloudforms_managementengine:5::el6 |
before 0:0.7.0-1.el6cf | 0:0.7.0-1.el6cf |
ruby193-rubygem-more_core_extensionsRed Hat:cloudforms_managementengine:5::el6 |
before 0:1.1.2-1.el6cf | 0:1.1.2-1.el6cf |
ruby193-rubygem-nokogiriRed Hat:cloudforms_managementengine:5::el6 |
before 0:1.5.6-3.el6cf | 0:1.5.6-3.el6cf |
ruby193-rubygem-nokogiri-debuginfoRed Hat:cloudforms_managementengine:5::el6 |
before 0:1.5.6-3.el6cf | 0:1.5.6-3.el6cf |
ruby193-rubygemsRed Hat:cloudforms_managementengine:5::el6 |
before 0:1.8.23-40.1.el6 | 0:1.8.23-40.1.el6 |
ruby193-rubygems-develRed Hat:cloudforms_managementengine:5::el6 |
before 0:1.8.23-40.1.el6 | 0:1.8.23-40.1.el6 |
ruby193-rubygem-actionpackRed Hat:rhel_software_collections:1::el6 |
before 1:3.2.8-5.3.el6 | 1:3.2.8-5.3.el6 |
ruby193-rubygem-actionpack-docRed Hat:rhel_software_collections:1::el6 |
before 1:3.2.8-5.3.el6 | 1:3.2.8-5.3.el6 |
History
| When | Changed | Sources |
|---|---|---|
| 2026-11-03 | aliases | EUVD |
| 2026-11-02 | created | CVE List, GitHub Advisories, NVD, OSV |
References
rhn.redhat.com/errata/RHSA-2014-0215.html
rhn.redhat.com/errata/RHSA-2014-0306.html
securityfocus.com/bid/65647
securitytracker.com/id/1029782
openwall.com/lists/oss-security/2014/02/18/8
lists.opensuse.org/opensuse-updates/2014-02/msg00081.html
Show 42 moreShow less
secunia.com/advisories/57376
groups.google.com/forum/message/raw?msg=rubyonrails-security/tfp6gZCtzr4/j8LUHmu7fIEJ
nvd.nist.gov/vuln/detail/CVE-2014-0081
web.archive.org/web/20140911141416/http://www.securitytracker.com/id/1029782
web.archive.org/web/20170307202606/http://www.securityfocus.com/bid/65647
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
web.archive.org/web/20201207045136/https://groups.google.com/forum/message/raw?msg=rubyonrails-security/tfp6gZCtzr4/j8LUHmu7fIEJ
github.com/advisories/GHSA-m46p-ggm5-5j83
security-tracker.debian.org/tracker/CVE-2014-0081
github.com/rails/rails
advisories.mageia.org/MGASA-2014-0191.html
lists.fedoraproject.org/pipermail/package-announce/2014-March/129715.html
lists.fedoraproject.org/pipermail/package-announce/2014-March/129716.html
weblog.rubyonrails.org/2014/2/18/Rails_3_2_17_4_0_3_and_4_1_0_beta2_have_been_released
bugs.mageia.org/show_bug.cgi?id=12896
access.redhat.com/errata/RHSA-2014:0215
access.redhat.com/security/updates/classification
access.redhat.com/site/documentation/en-US/CloudForms/3.0/html/Management_Engine_5.2_Technical_Notes/index.html
bugzilla.redhat.com/show_bug.cgi?id=1033460
bugzilla.redhat.com/show_bug.cgi?id=1064140
bugzilla.redhat.com/show_bug.cgi?id=1065520
bugzilla.redhat.com/show_bug.cgi?id=1065538
security.access.redhat.com/data/csaf/v2/advisories/2014/rhsa-2014_0215.json
access.redhat.com/security/cve/CVE-2013-0186
bugzilla.redhat.com/show_bug.cgi?id=895346
cve.org/CVERecord?id=CVE-2013-0186
nvd.nist.gov/vuln/detail/CVE-2013-0186
access.redhat.com/security/cve/CVE-2013-4164
cve.org/CVERecord?id=CVE-2013-4164
nvd.nist.gov/vuln/detail/CVE-2013-4164
access.redhat.com/security/cve/CVE-2014-0057
cve.org/CVERecord?id=CVE-2014-0057
nvd.nist.gov/vuln/detail/CVE-2014-0057
access.redhat.com/security/cve/CVE-2014-0081
cve.org/CVERecord?id=CVE-2014-0081
access.redhat.com/security/cve/CVE-2014-0082
cve.org/CVERecord?id=CVE-2014-0082
nvd.nist.gov/vuln/detail/CVE-2014-0082
access.redhat.com/errata/RHSA-2014:0306
security.access.redhat.com/data/csaf/v2/advisories/2014/rhsa-2014_0306.json
Left out here: 100 versions. The JSON record has them.