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. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

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 Sun, 08 Nov 2026 00:17:07 +0000.