CVE-2007-3227 Moderate severity vulnerability that affects rails
Remote attackers can inject arbitrary web script via input values in the to_json function, requiring user interaction to execute.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2007-3227?
CVE-2007-3227 is a medium-severity cross-site scripting vulnerability in Rubyonrails Rails, published on 14 Jun 2007. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official 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.
Weakness: CWE-79
Which versions are affected by CVE-2007-3227?
2 open source packages ship an affected version, including rails. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
rails RubyGems | All versions | 1.2.5 |
rails RubyGems | All versions | 1.2.5 |
Products include Rubyonrails Rails.
How do I fix CVE-2007-3227?
Upgrade rails to 1.2.5 or later.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is CVE-2007-3227 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2007-3227 exists.
Public exploit code: 1 Exploit-DB entry.
Other vulnerabilities in Rubyonrails Rails
- CVE-2013-0277 Active Record contains deserialization of arbitrary YAML
- CVE-2017-17916 SQL injection in n/a
- CVE-2017-17917 SQL injection in n/a
- CVE-2026-33195 Rails Active Storage has possible Path Traversal in DiskService
- CVE-2024-26142 Rails possible ReDoS vulnerability in Accept header parsing in Action Dispatch
Sources
Also known as DEBIAN-CVE-2007-3227, GHSA-gm25-fpmr-43fj.