Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
XSS Vulnerability in the select helper
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Aaron Patterson  
View profile  
 More options Mar 1 2012, 1:04 pm
From: Aaron Patterson <tenderl...@ruby-lang.org>
Date: Thu, 1 Mar 2012 10:04:38 -0800
Local: Thurs, Mar 1 2012 1:04 pm
Subject: XSS Vulnerability in the select helper

There is a vulnerability for users that generate their own options tags for use with the select helper in Ruby On Rails.

Versions Affected:  All.
Fixed Versions:     3.2.2, 3.1.4, 3.0.12

Impact
------
When developers generate html options tags manually, user input concatenated with manually built tags may not be escaped and an attacker can inject arbitrary HTML in to the document.

Only manually generated select tag options are impacted, but all users running an affected release should either upgrade or use one of the work arounds immediately.

Releases
--------
The 3.2.2, 3.1.4, and 3.0.12 releases are available at the normal locations.

Workarounds
-----------
To work around this issue, escape manually built option tags passed to the select helper.  For example:

BEFORE (vulnerable):

    <%= select('post', 'author_id', "<option value='#{user.id}'>#{user.name}</option>") %>

AFTER (values are escaped):

    <%= select('post', 'author_id', content_tag(:option, user.name, :value => user.id) %>

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

Please note that only the  3.2.x, 3.1.x, and 3.0.x series are supported at present.  Users of earlier unsupported releases are advised to upgrade as soon as possible.

Credits
-------

Credit for these patches goes to Sergey Nartimov!  Thank you!

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

  3-0-select_options.patch
2K Download

  3-1-select_options.patch
2K Download

  3-2-select_options.patch
2K Download

  application_pgp-signature_part
< 1K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »