Denial of Service Vulnerability in Action View when using render :text (CVE-2014-0082)

Showing 1-1 of 1 messages
Denial of Service Vulnerability in Action View when using render :text (CVE-2014-0082) Aaron Patterson 2/18/14 11:06 AM
Denial of Service Vulnerability in Action View when using render :text

There is a denial of service vulnerability in the text rendering component of
Action View. This vulnerability has been assigned the CVE identifier
CVE-2014-0082.

Versions Affected: 3.0.x, 3.1.x, 3.2.x
Not affected: 4.0.x
Fixed Versions: 3.2.17

Impact
------

Strings sent in specially crafted headers will be converted to symbols. This can
cause a denial of service since symbols are not removed by the garbage collector.
All users running an affected release should either upgrade or use one of the work
arounds immediately.

Releases
--------

The FIXED releases are available at the normal locations.

Workarounds
-----------

Users who cannot upgrade may apply this monkey patch as an initializer to work around
the issue:

```
ActiveSupport.on_load(:action_view) do
  ActionView::Template::Text.class_eval do
    def formats
      [@mime_type.respond_to?(:ref) ? @mime_type.ref : @mime_type.to_s]
    end
  end
end
```

Patches
-------

To aid users who aren't able to upgrade immediately we have provided patches for the
supported release series. They are in git-am format and consist of a single changeset.

 * 3-2-render_text_dos.patch - Patch for 3.2 series
 * 3-1-render_text_dos.patch - Patch for 3.1 series
 * 3-0-render_text_dos.patch - Patch for 3.0 series

Please note that only the 4.0.x and 3.2.x series are supported at present. Users of
earlier unsupported releases are advised to upgrade as soon as possible as we cannot
guarantee the continued availability of security fixes for unsupported releases.

Credits
-------

Thanks to Toby Hsieh of SlideShare for reporting the issue to us and working in
the patch with us.

--
Aaron Patterson
http://tenderlovemaking.com/