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 translate helper method in Ruby on Rails
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
 
Michael Koziarski  
View profile   Translate to Translated (View Original)
 More options Nov 17 2011, 8:41 pm
From: Michael Koziarski <mich...@koziarski.com>
Date: Fri, 18 Nov 2011 14:41:45 +1300
Local: Thurs, Nov 17 2011 8:41 pm
Subject: XSS vulnerability in the translate helper method in Ruby on Rails

There is a vulnerability in the translate helper method which may allow
an attacker to insert arbitrary code into a page.  This vulnerability
has been disclosed to the public so no a CVE identifier has yet to be
assigned.

Versions Affected:  3.0.0 and later, 2.3.X in combination with the
rails_xss plugin
Not Affected:       Pre-3.0.0 releases, without the rails_xss plugin,
did no automatic XSS escaping, so are not considered vulnerable
Fixed Versions:     3.0.11, 3.1.2

Impact
------

Ruby on Rails has a helper method for i18n translations. This function
has a convention whereby translations strings with a name ending in
'html' are considered HTML safe. There is also a mechanism for
interpolation. It has been discovered that these 'html' strings allow
arbitrary values to be contained in the interpolated input, and these
values are not escaped.

All users using the translate helper method with 'html safe'
translations which use variable interpolation should either upgrade or
use one of the workarounds immediately.

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

Escape all interpolated input manually. For example:

  translate('some_html', :some => '<input>')

should be changed to:

  translate('some_html', :some => h('<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-translate.patch - Patch for 3.0 series
* 3-1-translate.patch - Patch for 3.1 series

Credits
-------

Thanks to Sergey Nartimov for finding the vulnerability and submitting
the initial patch.
--
Cheers,

Koz

  3-0-translate.patch
3K Download

  3-1-translate.patch
3K Download

  signature.asc
< 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 »