Advisory Database
  • Advisories
  • Dependency Scanning
  1. gem
  2. ›
  3. activesupport
  4. ›
  5. CVE-2015-3226

CVE-2015-3226: XSS Vulnerability in ActiveSupport::JSON.encode

July 26, 2015 (updated August 8, 2019)

When a Hash containing user-controlled data is encoded as JSON (either through Hash#to_json or ActiveSupport::JSON.encode), Rails does not perform adequate escaping that matches the guarantee implied by the escape_html_entities_in_json option (which is enabled by default). If this resulting JSON string is subsequently inserted directly into an HTML page, the page will be vulnerable to XSS attacks.

References

  • groups.google.com/forum/
  • groups.google.com/forum/

Code Behaviors & Features

Detect and mitigate CVE-2015-3226 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 starting from 4.1.0a before 4.1.11, all versions starting from 4.2.0a before 4.2.2

Fixed versions

  • 4.1.11
  • 4.2.2

Solution

Upgrade to latest, apply patch or use workaround; see provided link.

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/activesupport/CVE-2015-3226.yml

Spotted a mistake? Edit the file on GitLab.

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

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