Advisory Database
  • Advisories
  • Dependency Scanning
  1. gem
  2. ›
  3. actionpack
  4. ›
  5. CVE-2013-6415

CVE-2013-6415: XSS Vulnerability in number_to_currency

December 6, 2013 (updated August 8, 2019)

The number_to_currency helper allows users to nicely format a numeric value. The unit parameter is not escaped correctly. Application which pass user controlled data as the unit parameter are vulnerable to an XSS attack.

References

  • seclists.org/oss-sec/2013/q4/402

Code Behaviors & Features

Detect and mitigate CVE-2013-6415 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 3.2.16, all versions starting from 4.0.0 before 4.0.2

Fixed versions

  • 3.2.16
  • 4.0.2

Solution

Upgrade to latest or escape user controlled data passed at the unit parameter like this: <%= number_to_currency(1.02, unit: h(params[:currency])) %>

Impact 4.3 MEDIUM

AV:N/AC:M/Au:N/C:N/I:P/A:N

Learn more about CVSS

Weakness

  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Source file

gem/actionpack/CVE-2013-6415.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:59 +0000.