CVE-2011-2197
rails Cross-site Scripting vulnerability
Also known as GHSA-v9v4-7jp6-8c73
Mitigation
- Upgrade actionpack to one of 2.3.12, 3.0.8 (or later in the same release line).
- Upgrade activesupport to one of 2.3.12, 3.0.8 (or later in the same release line).
Who should check
- Projects that depend on RubyGems package actionpack (>= 2.0.0, < 2.3.12)
- Projects that depend on RubyGems package activesupport (>= 2.0.0, < 2.3.12)
- Anyone running n/a (versions: see the vendor advisory)
Vulnerability facts
- Affected
- actionpack >= 2.0.0, < 2.3.12; activesupport >= 2.0.0, < 2.3.12
- Fixed in
- 2.3.12, 3.0.8
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, no login needed
- CVSS
- 4.3 (v2.0, NVD)AV:N/AC:M/Au:N/C:N/I:P/A:N
Show all 6 CVSS metrics
- Attack vector: Network
- Attack complexity: Medium
- Authentication: None
- Confidentiality impact: None
- Integrity impact: Partial
- Availability impact: None
- EPSS
- 1.96% chance of exploitation in 30 days (percentile 81, 2026-11-26)
- CWE
- CWE-79
- Modified
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.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| RubyGems actionpack | >= 2.0.0, < 2.3.12 | 2.3.12, 3.0.8 | osv |
| RubyGems activesupport | >= 2.0.0, < 2.3.12 | 2.3.12, 3.0.8 | osv |
| n/a | — | — | nvd |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2011-2197. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2011-2197.md Affected: actionpack >= 2.0.0, < 2.3.12; activesupport >= 2.0.0, < 2.3.12 Fixed in: 2.3.12, 3.0.8 Steps: 1. Search this machine and project for actionpack (RubyGems), activesupport (RubyGems), n/a: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
Patches
- http://groups.google.com/group/rubyonrails-security/msg/663b600d4471e0d4?dmode=source&output=gplain
- http://weblog.rubyonrails.org/2011/6/8/potential-xss-vulnerability-in-ruby-on-rails-applications
- http://openwall.com/lists/oss-security/2011/06/09/2
- http://openwall.com/lists/oss-security/2011/06/13/9
- https://github.com/rails/rails/commit/53a2c0baf2b128dd4808eca313256f6f4bb8c4cd
- https://github.com/rails/rails/commit/ed3796434af6069ced6a641293cf88eef3b284da
FAQ
Is CVE-2011-2197 being exploited?
There is no confirmed exploitation: CVE-2011-2197 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 1.96% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2011-2197?
Medium: CVSS 4.3 (v2.0, scored by NVD). Remote, no login needed.
Which versions are affected by CVE-2011-2197?
actionpack >= 2.0.0, < 2.3.12; activesupport >= 2.0.0, < 2.3.12.
Is there a fix for CVE-2011-2197?
Yes. Fixed in 2.3.12, 3.0.8. Upgrade actionpack to one of 2.3.12, 3.0.8 (or later in the same release line). Upgrade activesupport to one of 2.3.12, 3.0.8 (or later in the same release line).
How do I check if I'm affected by CVE-2011-2197?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.