Filter Skipping Vulnerability in Ruby on Rails 3.0

261 views
Skip to first unread message

Aaron Patterson

unread,
Aug 16, 2011, 4:58:41 PM8/16/11
to rubyonrail...@googlegroups.com
Filter Skipping Vulnerability in Ruby on Rails 3.0

There is a vulnerability in the template selection code in Ruby on Rails releases after 3.0 which could allow an attacker to render a view they should not have access to. This vulnerability has been assigned the CVE identifier CVE-YYYY-XXXX.

Versions Affected: 3.0.0 and Later
Not affected: Versions prior to 3.0
Fixed Versions: 3.0.10, 3.1.0.rc6

Impact
------
Due to a bug in the template selection code an attacker can craft a URL and cause Rails to render an arbitrary view, but not call its corresponding action. This only affects 3.0 applications which use ':action' in their routes.

All users running an affected release and using :action in their routes should either upgrade or use one of the workarounds immediately.

Releases
--------
The 3.0.10 and 3.1.0.rc6 releases are available at the normal locations.

Workarounds
-----------
This only affects users with routes containing the parameter :action, you can avoid the vulnerability by providing additional constraints. For instance replacing:

match '/:controller(/:action(/:id))'

with

match '/:controller(/:action(/:id))', :action => /[a-z_]+/


Patches
-------
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.

* 3-0-filter_skipping.patch - Patch for 3.0 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.

Credits
-------

Thanks to Jan M. Faber of supersaas for reporting the problem to us and working with us to verify the fix.

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

3-0-stable-fix-filter-skipping.patch
3-1-stable-fix-filter-skipping.patch
Reply all
Reply to author
Forward
0 new messages