Description
The to_s method in actionpack/lib/action_dispatch/middleware/remote_ip.rb in Ruby on Rails 3.0.5 does not validate the X-Forwarded-For header in requests from IP addresses on a Class C network, which might allow remote attackers to inject arbitrary text into log files or bypass intended address parsing via a crafted header.
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 | No fix yet | — |
| Debian 13 | rails | No fix yet | — |
| Debian 12 | rails | No fix yet | — |
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 3.0.5 - 'WEBrick::HTTPRequest' Module HTTP Header Injection EDB-35352 · remote · Feb 16, 2011 · 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 | actionpack | >= 2.3.0, < 2.3.13 | 2.3.13 | GHSA-3vfw-7rcp-3xgm |
References
- 20110216 Ruby on Rails Vulnerability mailing-list
- [oss-security] 20110817 CVE request: ruby on rails flaws (4) mailing-list
- [oss-security] 20110822 Re: CVE request: ruby on rails flaws (4) mailing-list
- http://webservsec.blogspot.com/2011/02/ruby-on-rails-vulnerability.html
- [oss-security] 20110819 Re: CVE request: ruby on rails flaws (4) mailing-list
- [oss-security] 20110820 Re: CVE request: ruby on rails flaws (4) mailing-list
- [oss-security] 20110822 Re: CVE request: ruby on rails flaws (4) mailing-list
- https://bugzilla.novell.com/show_bug.cgi?id=673010
- [oss-security] 20110822 Re: CVE request: ruby on rails flaws (4) mailing-list