CWE
79
Advisory Published
CVE Published
Advisory Published
Updated

CVE-2011-2931: XSS

First published: Wed Aug 17 2011(Updated: )

An XSS vulnerability in the strip_tags helper in Ruby on Rails was reported [1] where, using specially crafted output, an attacker can successfully inject HTML into the document, which can be used to inject arbitrary javascript into the rendered page. This is corrected in upstream 3.0.10, 2.3.13, and 3.1.0rc5 versions. Patches are available in the advisory [1] and in git [2]. [1] <a href="http://groups.google.com/group/rubyonrails-security/browse_thread/thread/2b9130749b74ea12">http://groups.google.com/group/rubyonrails-security/browse_thread/thread/2b9130749b74ea12</a> [2] <a href="https://github.com/rails/rails/commit/586a944ddd4d03e66dea1093306147594748037a">https://github.com/rails/rails/commit/586a944ddd4d03e66dea1093306147594748037a</a>

Credit: secalert@redhat.com

Affected SoftwareAffected VersionHow to fix
rubygems/actionpack>=3.0.0<3.0.10
3.0.10
rubygems/actionpack>=2.0.0<2.3.13
2.3.13
redhat/rubygem-actionpack<2.3.13
2.3.13
redhat/rubygem-actionpack<3.0.10
3.0.10
redhat/rubygem-actionpack<3.1.0
3.1.0
Ruby on Rails=2.0.0
Ruby on Rails=2.0.0-rc1
Ruby on Rails=2.0.0-rc2
Ruby on Rails=2.0.1
Ruby on Rails=2.0.2
Ruby on Rails=2.0.4
Ruby on Rails=2.1.0
Ruby on Rails=2.1.1
Ruby on Rails=2.1.2
Ruby on Rails=2.2.0
Ruby on Rails=2.2.1
Ruby on Rails=2.2.2
Ruby on Rails=2.3.2
Ruby on Rails=2.3.3
Ruby on Rails=2.3.4
Ruby on Rails=2.3.9
Ruby on Rails=2.3.10
Ruby on Rails=2.3.11
Ruby on Rails=2.3.12
Ruby on Rails=3.0.0
Ruby on Rails=3.0.0-beta
Ruby on Rails=3.0.0-beta2
Ruby on Rails=3.0.0-beta3
Ruby on Rails=3.0.0-beta4
Ruby on Rails=3.0.0-rc
Ruby on Rails=3.0.0-rc2
Ruby on Rails=3.0.1
Ruby on Rails=3.0.1-pre
Ruby on Rails=3.0.2
Ruby on Rails=3.0.2-pre
Ruby on Rails=3.0.3
Ruby on Rails=3.0.4-rc1
Ruby on Rails=3.0.5
Ruby on Rails=3.0.5-rc1
Ruby on Rails=3.0.6
Ruby on Rails=3.0.6-rc1
Ruby on Rails=3.0.6-rc2
Ruby on Rails=3.0.7
Ruby on Rails=3.0.7-rc1
Ruby on Rails=3.0.7-rc2
Ruby on Rails=3.0.8
Ruby on Rails=3.0.8-rc1
Ruby on Rails=3.0.8-rc2
Ruby on Rails=3.0.8-rc3
Ruby on Rails=3.0.8-rc4
Ruby on Rails=3.0.9
Ruby on Rails=3.0.9-rc1
Ruby on Rails=3.0.9-rc2
Ruby on Rails=3.0.9-rc3
Ruby on Rails=3.0.9-rc4
Ruby on Rails=3.0.9-rc5
Ruby on Rails=3.0.10-rc1
Ruby on Rails=3.1.0
Ruby on Rails=3.1.0-beta1
Ruby on Rails=3.1.0-rc1
Ruby on Rails=3.1.0-rc2
Ruby on Rails=3.1.0-rc3
Ruby on Rails=3.1.0-rc4
Ruby on Rails=3.0.4

Never miss a vulnerability like this again

Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.

Reference Links

Frequently Asked Questions

  • What is the severity of CVE-2011-2931?

    CVE-2011-2931 is categorized as a moderate severity vulnerability due to its potential for XSS exploitation.

  • How do I fix CVE-2011-2931?

    You can fix CVE-2011-2931 by upgrading to ActionPack version 3.0.10 or 2.3.13 or later.

  • What types of attacks can CVE-2011-2931 facilitate?

    CVE-2011-2931 can facilitate cross-site scripting (XSS) attacks, allowing attackers to inject arbitrary HTML and JavaScript into web pages.

  • Which Ruby on Rails versions are affected by CVE-2011-2931?

    CVE-2011-2931 affects Ruby on Rails versions prior to 3.0.10 and 2.3.13.

  • Is CVE-2011-2931 still a threat if I use a patched version of ActionPack?

    If you are using a patched version of ActionPack (3.0.10 or 2.3.13), CVE-2011-2931 should not pose a threat.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2025 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203