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.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | rails | 1.2.5-1 | — |
| Debian 13 | rails | 1.2.5-1 | — |
| Debian 12 | rails | 1.2.5-1 | — |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
Exploit-DB 1
- Ruby on Rails 1.2.3 To_JSON - Script Injection EDB-30089 · remote · May 25, 2007 · verified
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| RubyGems | rails | < 1.2.5 | 1.2.5 | GHSA-gm25-fpmr-43fj |
References
- http://pastie.caboo.se/65550.txt
- 25699 third-party-advisory
- ADV-2007-2216 vdb-entry
- GLSA-200711-17 vendor-advisory
- 27756 third-party-advisory
- 36378 vdb-entry
- 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
- SUSE-SR:2007:024 vendor-advisory
- 27657 third-party-advisory
- http://dev.rubyonrails.org/ticket/8371
- 24161 vdb-entry