Bug 847196 (CVE-2012-3463)

Summary: CVE-2012-3463 rubygem-actionpack: potential XSS vulnerability in select_tag prompt
Product: [Other] Security Response Reporter: Kurt Seifried <kseifried>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: bkabrda, bkearney, katello-internal, mastahnke, mmccune, mmorsi, morazi, rmillner, sseago, tkramer, vanmeeuwen+fedora, vondruch
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: impact=moderate,public=20120809,reported=20120809,source=oss-security,cvss2=4.3/AV:N/AC:M/Au:N/C:N/I:P/A:N,cloudformscommon-1/rubygem-actionpack=affected,sam-1/rubygem-actionpack=affected,openshift-1/rubygem-actionpack=affected,fedora-all/rubygem-actionpack=affected,epel-5/rubygem-actionpack=new,openshift-enterprise-1/rubygem-activerecord=affected,cwe=CWE-79[auto]
Fixed In Version: rubygem-actionpack 3.0.17, rubygem-actionpack 3.1.8, rubygem-actionpack 3.2.8 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-08-13 01:07:29 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On: 847201, 847202, 847203, 847204, 849728, 896174, 903995, 995684    
Bug Blocks: 836071, 851385    
Description Flags
CVE-2012-3463-3-2-select_tag_prompt.patch none

Description Kurt Seifried 2012-08-10 00:59:40 EDT
The ruby on Rails project reports:

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

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

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

- -----------

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

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

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

Comment 1 Kurt Seifried 2012-08-10 01:01:46 EDT
Created attachment 603413 [details]
Comment 2 Kurt Seifried 2012-08-10 01:02:14 EDT
Created attachment 603414 [details]
Comment 3 Kurt Seifried 2012-08-10 01:02:42 EDT
Created attachment 603415 [details]
Comment 4 Kurt Seifried 2012-08-10 01:23:02 EDT
Created rubygem-actionpack tracking bugs for this issue

Affects: fedora-all [bug 847201]
Comment 5 Kurt Seifried 2012-08-10 01:24:22 EDT
Created rubygem-actionpack tracking bugs for this issue

Affects: epel-5 [bug 847202]
Comment 8 Fedora Update System 2012-08-22 16:58:35 EDT
rubygem-actionpack-3.0.10-9.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 9 Fedora Update System 2012-08-22 17:10:53 EDT
rubygem-actionpack-3.0.11-7.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 10 errata-xmlrpc 2012-12-04 14:31:57 EST
This issue has been addressed in following products:

  CloudForms for RHEL 6

Via RHSA-2012:1542 https://rhn.redhat.com/errata/RHSA-2012-1542.html
Comment 11 errata-xmlrpc 2013-01-10 15:42:29 EST
This issue has been addressed in following products:

  Red Hat Subscription Asset Manager 1.1

Via RHSA-2013:0154 https://rhn.redhat.com/errata/RHSA-2013-0154.html
Comment 14 errata-xmlrpc 2013-02-28 14:07:59 EST
This issue has been addressed in following products:

  RHEL 6 Version of OpenShift Enterprise

Via RHSA-2013:0582 https://rhn.redhat.com/errata/RHSA-2013-0582.html