David Heinemeier Hansson Ruby on Rails 3.2.15/4.0.1 Validation number_to_currency unit cross site scripting

CVSS Meta Temp Score
CVSS is a standardized scoring system to determine possibilities of attacks. The Temp Score considers temporal factors like disclosure, exploit and countermeasures. The unique Meta Score calculates the average score of different sources to provide a normalized scoring system.
Current Exploit Price (≈)
Our analysts are monitoring exploit markets and are in contact with vulnerability brokers. The range indicates the observed or calculated exploit price to be seen on exploit markets. A good indicator to understand the monetary effort required for and the popularity of an attack.
CTI Interest Score
Our Cyber Threat Intelligence team is monitoring different web sites, mailing lists, exploit markets and social media networks. The CTI Interest Score identifies the interest of attackers and the security community for this specific vulnerability in real-time. A high score indicates an elevated risk to be targeted for this vulnerability.
6.0$0-$5k0.00

Summaryinfo

A vulnerability was found in David Heinemeier Hansson Ruby on Rails 3.2.15/4.0.1. It has been classified as problematic. Affected is the function number_to_currency of the component Validation Handler. Performing a manipulation of the argument unit results in cross site scripting. This vulnerability was named CVE-2013-6415. The attack may be initiated remotely. There is no available exploit. Upgrading the affected component is recommended.

Detailsinfo

A vulnerability was found in David Heinemeier Hansson Ruby on Rails 3.2.15/4.0.1 (Programming Language Software). It has been classified as critical. This affects the function number_to_currency of the component Validation Handler. The manipulation of the argument unit with an unknown input leads to a cross site scripting vulnerability. CWE is classifying the issue as CWE-79. The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. This is going to have an impact on confidentiality, integrity, and availability. The summary by CVE is:

Cross-site scripting (XSS) vulnerability in the number_to_currency helper in actionpack/lib/action_view/helpers/number_helper.rb in Ruby on Rails before 3.2.16 and 4.x before 4.0.2 allows remote attackers to inject arbitrary web script or HTML via the unit parameter.

The weakness was presented 12/03/2013 by Ankit Gupta as XSS Vulnerability in number_to_currency as confirmed posting (Maillist). The advisory is shared at groups.google.com. The public release was coordinated in cooperation with David Heinemeier Hansson. This vulnerability is uniquely identified as CVE-2013-6415 since 11/04/2013. The exploitability is told to be easy. It is possible to initiate the attack remotely. No form of authentication is needed for exploitation. It demands that the victim is doing some kind of user interaction. Technical details are known, but no exploit is available. MITRE ATT&CK project uses the attack technique T1059.007 for this issue.

The vulnerability scanner Nessus provides a plugin with the ID 75234 (openSUSE Security Update : rubygem-actionpack-2_3 (openSUSE-SU-2013:1905-1)), which helps to determine the existence of the flaw in a target environment. It is assigned to the family SuSE Local Security Checks. The commercial vulnerability scanner Qualys is able to test this issue with plugin 12793 (Ruby on Rails Multiple Vulnerabilities).

Upgrading to version 3.2.16 or 4.0.2 eliminates this vulnerability. The upgrade is hosted for download at rubyonrails.org. A possible mitigation has been published immediately after the disclosure of the vulnerability. The posting contains the following remark:

The workaround for this issue is to escape the value passed to the :unit parameter. For example, replace code like this: <%= number_to_currency(1.02, unit: params[:currency]) %> With code like this <%= number_to_currency(1.02, unit: h(params[:currency])) %>

The vulnerability is also documented in the databases at X-Force (89436), Tenable (75234), SecurityFocus (BID 64077†), OSVDB (100524†) and Secunia (SA55864†). See VDB-11374, VDB-11375, VDB-11376 and VDB-65653 for similar entries. If you want to get the best quality for vulnerability data then you always have to consider VulDB.

Productinfo

Type

Vendor

Name

Version

License

CPE 2.3info

CPE 2.2info

CVSSv4info

VulDB Vector: 🔍
VulDB Reliability: 🔍

CVSSv3info

VulDB Meta Base Score: 6.3
VulDB Meta Temp Score: 6.0

VulDB Base Score: 6.3
VulDB Temp Score: 6.0
VulDB Vector: 🔍
VulDB Reliability: 🔍

CVSSv2info

AVACAuCIA
💳💳💳💳💳💳
💳💳💳💳💳💳
💳💳💳💳💳💳
VectorComplexityAuthenticationConfidentialityIntegrityAvailability
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock

VulDB Base Score: 🔍
VulDB Temp Score: 🔍
VulDB Reliability: 🔍

NVD Base Score: 🔍

Exploitinginfo

Class: Cross site scripting
CWE: CWE-79 / CWE-94 / CWE-74
CAPEC: 🔍
ATT&CK: 🔍

Physical: No
Local: No
Remote: Yes

Availability: 🔍
Status: Not defined

EPSS Score: 🔍
EPSS Percentile: 🔍

Price Prediction: 🔍
Current Price Estimation: 🔍

0-DayUnlockUnlockUnlockUnlock
TodayUnlockUnlockUnlockUnlock

Nessus ID: 75234
Nessus Name: openSUSE Security Update : rubygem-actionpack-2_3 (openSUSE-SU-2013:1905-1)
Nessus File: 🔍
Nessus Risk: 🔍
Nessus Family: 🔍
Nessus Port: 🔍

OpenVAS ID: 702888
OpenVAS Name: Debian Security Advisory DSA 2888-1 (ruby-actionpack-3.2 - security update
OpenVAS File: 🔍
OpenVAS Family: 🔍

Qualys ID: 🔍
Qualys Name: 🔍

Threat Intelligenceinfo

Interest: 🔍
Active Actors: 🔍
Active APT Groups: 🔍

Countermeasuresinfo

Recommended: Upgrade
Status: 🔍

Reaction Time: 🔍
0-Day Time: 🔍
Exposure Time: 🔍

Upgrade: Ruby on Rails 3.2.16/4.0.2
Workaround: Add parentheses to code

Timelineinfo

11/04/2013 🔍
12/03/2013 +29 days 🔍
12/03/2013 +0 days 🔍
12/03/2013 +0 days 🔍
12/05/2013 +2 days 🔍
12/06/2013 +1 days 🔍
12/17/2013 +11 days 🔍
06/13/2014 +178 days 🔍
06/02/2021 +2546 days 🔍

Sourcesinfo

Advisory: XSS Vulnerability in number_to_currency
Researcher: Ankit Gupta
Status: Confirmed
Confirmation: 🔍
Coordinated: 🔍

CVE: CVE-2013-6415 (🔍)
GCVE (CVE): GCVE-0-2013-6415
GCVE (VulDB): GCVE-100-11373
X-Force: 89436
SecurityFocus: 64077
Secunia: 55864 - Ruby on Rails Multiple Vulnerabilities, Moderately Critical
OSVDB: 100524
Vulnerability Center: 42613 - Ruby on Rails Before 3.2.16, 4.* Before 4.0.2 Remote Cross-Site Scripting Vulnerability in actionpack/lib/action_view/helpers/number_helper.rb, Medium

See also: 🔍

Entryinfo

Created: 12/05/2013 14:00
Updated: 06/02/2021 16:49
Changes: 12/05/2013 14:00 (55), 05/17/2017 12:29 (32), 06/02/2021 16:49 (3)
Complete: 🔍
Committer:
Cache ID: 216::103

If you want to get the best quality for vulnerability data then you always have to consider VulDB.

Discussion

No comments yet. Languages: en.

Please log in to comment.

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!