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

Timeline

  1. 2011-06-30Published by the CNA15:26 UTC
  2. 2017-10-24GitHub advisory published (GHSA-v9v4-7jp6-8c73)2308 days after publication

The timeline shows what already happened. To be told when this CVE changes next, watch it from the API.

Exploit and advisory records

GitHub advisory GHSA-v9v4-7jp6-8c73, affected packages:

PackageVulnerable versionsFixed in
RubyGems actionpackfrom 2.0.0 before 2.3.122.3.12
RubyGems actionpackfrom 3.0.0 before 3.0.83.0.8
RubyGems activesupportfrom 2.0.0 before 2.3.122.3.12
RubyGems activesupportfrom 3.0.0 before 3.0.83.0.8

Affected products

Products listed as vulnerable. Upgrade to the version under "Fixed in", or a later one.

ProductVulnerable versionsFixed in
rubyonrails rails2.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_rails3.0.4no fix listednot listed

Products and versions as NVD and the vendor that published the CVE list them.

References

Get more CVE data from the API.

Free without a key or signup. Pro adds monitoring and higher limits: pricing.

Sources