CVE-2012-3465: XSS
Cross-site scripting (XSS) vulnerability in actionpack/lib/actionview/helpers/sanitizehelper.rb in the striptags helper in Ruby on Rails before 2.3.16, 3.0.x before 3.0.17, 3.1.x before 3.1.8, and 3.2.x before 3.2.8 allows remote attackers to inject arbitrary web script or HTML via malformed HTML markup.
Other sources
Cross-site scripting (XSS) vulnerability in actionpack/lib/actionview/helpers/sanitizehelper.rb in the striptags helper in Ruby on Rails before 3.0.17, 3.1.x before 3.1.8, and 3.2.x before 3.2.8 allows remote attackers to inject arbitrary web script or HTML via malformed HTML markup.
— NVD
The Ruby on Rails project reports:
XSS Vulnerability in striptags
There is a vulnerability in the striptags helper of Ruby on Rails which could allow an attacker to execute arbitrary javascript. This vulnerability has been assigned the CVE identifier CVE-2012-3465.
Versions Affected: All. Not affected: Applications not using striptags Fixed Versions: 3.2.8, 3.1.8, 3.0.17
Impact - ------ There is an XSS vulnerability in the striptags helper in Ruby on Rails, the helper doesn't correctly handle malformed html. As a result an attacker can execute arbitrary javascript through the use of specially crafted malformed html. All users who rely on striptags for XSS protection should upgrade or use the work around immediately.
Releases - -------- The 3.2.8 and 3.1.8 releases are available at the normal locations.
Workarounds - ----------- For users running earlier releases we have provided a work around, place the attached file into the config/initializers directory of your application.
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-striptags.patch - Patch for 3.0 series 3-1-striptags.patch - Patch for 3.1 series 3-2-striptags.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.
Credits - -------
Thanks to Marek from Nethemba (www.nethemba.com) for reporting this issue!
---
References: http://weblog.rubyonrails.org/2012/8/9/ann-rails-3-2-8-has-been-released/
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2012-3465?
CVE-2012-3465 is classified as a high severity cross-site scripting (XSS) vulnerability.
How do I fix CVE-2012-3465?
To remediate CVE-2012-3465, upgrade to Ruby on Rails versions 2.3.16, 3.0.17, 3.1.8, or 3.2.8 and above.
Which versions of Ruby on Rails are affected by CVE-2012-3465?
CVE-2012-3465 affects Ruby on Rails versions prior to 2.3.16, 3.0.x before 3.0.17, 3.1.x before 3.1.8, and 3.2.x before 3.2.8.
What kind of attack can CVE-2012-3465 lead to?
CVE-2012-3465 can allow remote attackers to inject arbitrary web scripts or HTML, potentially compromising user data.
Is additional configuration required after fixing CVE-2012-3465?
No additional configuration is required after upgrading to the patched versions addressing CVE-2012-3465.