CVE-2011-2197
Description
The cross-site scripting (XSS) prevention feature in Ruby on Rails 2.x before 2.3.12, 3.0.x before 3.0.8, and 3.1.x before 3.1.0.rc2 does not properly handle mutation of safe buffers, which makes it easier for remote attackers to conduct XSS attacks via crafted strings to an application that uses a problematic string method, as demonstrated by the sub method.
Severity
not scored
CVSS v3
not scored
Exploit chance (EPSS)
1.962%
chance of exploitation in the next 30 days
higher than 80.7% of scored CVEs · 2026-11-17
CISA KEV
Not listed
Public exploit code
None public
Exploit references (NVD and CNA): 0
Metasploit modules: 0
Nuclei templates: 0
Weakness
- CWE-79: Improper Neutralization of Input During Web Page Generation
Timeline
- 2011-06-30Published by the CNA15:26 UTC
- 2017-10-24GitHub advisory published (GHSA-v9v4-7jp6-8c73)2308 days after publication
Exploit and advisory records
GitHub advisory GHSA-v9v4-7jp6-8c73, affected packages:
| Package | Vulnerable versions | Fixed in |
|---|---|---|
| RubyGems actionpack | from 2.0.0 before 2.3.12 | 2.3.12 |
| RubyGems actionpack | from 3.0.0 before 3.0.8 | 3.0.8 |
| RubyGems activesupport | from 2.0.0 before 2.3.12 | 2.3.12 |
| RubyGems activesupport | from 3.0.0 before 3.0.8 | 3.0.8 |
Affected products
Products listed as vulnerable. Upgrade to the version under "Fixed in", or a later one.
| Product | Vulnerable versions | Fixed in |
|---|---|---|
| rubyonrails rails | 2.0.0no fix listed2.0.1no fix listed2.0.2no fix listed2.0.4no fix listed2.1.0no fix listed(+21 more) | not listednot listednot listednot listednot listed |
| rubyonrails ruby_on_rails | 3.0.4no fix listed | not listed |
References
- http://groups.google.com/group/rubyonrails-security/msg/663b600d4471e0d4?dmode=source&output=gplain
- http://openwall.com/lists/oss-security/2011/06/09/2
- http://openwall.com/lists/oss-security/2011/06/13/9
- http://weblog.rubyonrails.org/2011/6/8/potential-xss-vulnerability-in-ruby-on-rails-applications
- http://lists.fedoraproject.org/pipermail/package-announce/2011-July/062514.html
- http://lists.fedoraproject.org/pipermail/package-announce/2011-June/062090.html
- http://secunia.com/advisories/44789
Get more CVE data from the API.
curl 'https://api.contrastcyber.com/cve_lookup/CVE-2011-2197'curl 'https://api.contrastcyber.com/cve_risk_score/CVE-2011-2197'curl 'https://api.contrastcyber.com/cve_exploit/CVE-2011-2197'curl 'https://api.contrastcyber.com/cve_products/CVE-2011-2197'
Sources
- Vulnerability data from the National Vulnerability Database (NIST) and the CVE Program. CVE records: Copyright © 1999-2026, The MITRE Corporation, used under the CVE Program Terms of Use. CVE® is a registered trademark of The MITRE Corporation.
- CWE definitions: Copyright © 2006-2026, The MITRE Corporation, used under the CWE Terms of Use. CWE is a trademark of The MITRE Corporation.
- OWASP Top 10 categories by the OWASP Foundation (CC BY 3.0).
- EPSS scores by FIRST.org EPSS, used with attribution.
- KEV catalog and SSVC decisions by CISA.
- Advisory data from the GitHub Advisory Database through OSV.dev (CC BY 4.0).
- Exploit metadata from the Exploit Database (GPL-2.0-only, metadata only).
- Nuclei template names from nuclei-templates (MIT).