Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CAKecwXDuTszn0UijMP3YRbCHUVWh=VzBtnZW=mzFy_CGN1UH6Q@mail.gmail.com>
Date: Thu, 9 Aug 2012 18:24:39 -0300
From: Santiago Pastorino <santiago@...works.com>
To: rubyonrails-security@...glegroups.com, oss-security@...ts.openwall.com
Subject: Ruby on Rails Potential XSS Vulnerability in select_tag prompt

There is a vulnerability in Ruby on Rails in the select_tag helper
method when a "prompt" is supplied. This vulnerability has been
assigned the CVE identifier CVE-2012-3463.

Versions Affected:  3.x.
Not affected:       2.3.x
Fixed Versions:     3.2.8, 3.1.8, 3.0.17

Impact
- ------
When a "prompt" value is supplied to the `select_tag` helper, the
"prompt" value is not escaped.  If untrusted data is not escaped, and
is supplied as the prompt value, there is a potential for XSS attacks.

Vulnerable code will look something like this:

    select_tag("name", options, :prompt => UNTRUSTED_INPUT)

All users running an affected release should either upgrade or use one
of the work arounds immediately.

Releases
- --------
The 3.2.8, 3.1.8, and 3.0.17 releases are available at the normal locations.

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

A possible workaround for this vulnerability is to escape user input
supplied to the prompt key:

    select_tag("name", options, :prompt => h(UNTRUSTED_INPUT))


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-select_tag_prompt.patch - Patch for 3.0 series
* 3-1-select_tag_prompt.patch - Patch for 3.1 series
* 3-2-select_tag_prompt.patch - Patch for 3.2 series

Please note that only the 3.1.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.

---

Santiago Pastorino
WyeWorks Co-founder
http://www.wyeworks.com

Twitter: http://twitter.com/spastorino
Github: http://github.com/spastorino

Download attachment "3-2-select_tag_prompt.patch" of type "application/octet-stream" (2611 bytes)

Download attachment "3-1-select_tag_prompt.patch" of type "application/octet-stream" (2611 bytes)

Download attachment "3-0-select_tag_prompt.patch" of type "application/octet-stream" (2585 bytes)

Powered by blists - more mailing lists

Please check out the Open Source Software Security Wiki, which is counterpart to this mailing list.

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.