Ruby on Rails 'WEBrick::HTTPRequest' Module HTTP Header Injection Vulnerability

BID:46423

Info

Ruby on Rails 'WEBrick::HTTPRequest' Module HTTP Header Injection Vulnerability

Bugtraq ID: 46423
Class: Input Validation Error
CVE: CVE-2011-3187
Remote: Yes
Local: No
Published: Feb 16 2011 12:00AM
Updated: Oct 17 2011 05:11PM
Credit: Jimmy Bandit
Vulnerable: Ruby on Rails Ruby on Rails 3.0.5
Not Vulnerable:

Discussion

Ruby on Rails 'WEBrick::HTTPRequest' Module HTTP Header Injection Vulnerability

Ruby on Rails is prone to a vulnerability that allows attackers to inject arbitrary content into the 'X-Forwarded-For', 'X-Forwarded-Host' and 'X-Forwarded-Server' HTTP headers because the 'WEBrick::HTTPRequest' module fails to sufficiently sanitize input.

By inserting arbitrary data into the affected HTTP header field, attackers may be able to launch cross-site request-forgery, cross-site scripting, HTML-injection, and other attacks.

NOTE: This issue only affects requests sent from clients on the same subnet as the server.

Ruby on Rails 3.0.5 is vulnerable; other versions may also be affected.

Exploit / POC

Ruby on Rails 'WEBrick::HTTPRequest' Module HTTP Header Injection Vulnerability

Attackers may use common networking tools to exploit this issue. For some attacks, a vulnerable user may have to follow a malicious URI.

The following exploit code is available:

Solution / Fix

Ruby on Rails 'WEBrick::HTTPRequest' Module HTTP Header Injection Vulnerability

Solution:
Currently we are not aware of any vendor-supplied patches. If you feel we are in error or if you are aware of more recent information, please mail us at: [email protected].

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report