Response Splitting Vulnerability in Ruby on Rails
There is a vulnerability in the content type handling in Ruby on Rails 2.3 which could allow an attacker to inject arbitrary HTTP headers into a response. This vulnerability has been assigned the CVE identifier CVE-YYYY-XXXX.
Versions Affected: 2.3.x.
Not affected: 3.0.0 or later
Fixed Versions: 2.3.13
The code in Ruby on Rails 2.3 which sets the response content type performs insufficient sanitization of the values provided. This means that applications which let the user provide an arbitrary Content-Type header for the response are vulnerable to response splitting attacks.
All users running an affected release should either upgrade or use one of the work arounds immediately.
The 2.3.13 releases are available at the normal locations.
There are no feasible workarounds for this issue.
To aid users who aren't able to upgrade immediately we have provided patches for the two supported release series. They are in git-am format and consist of a single changeset.
* 2-3-response_splitting.patch - Patch for 2.3 series
Please note that only the 2.3.x and 3.0.x series are supported at present. Users of earlier unsupported releases are advised to upgrade as soon as possible.
Thanks to Brent Miller of New Relic for reporting the issue to us.