CVE-2011-2197: Actionpack Cross-Site Scripting Vulnerability
MODERATECVE-2011-2197 is a MODERATE cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Actionpack libraries in the RubyGems ecosystem. The issue involves rails cross-site scripting vulnerability. Remediation is available by upgrading affected packages to version 2.3.12, 3.0.8.
CVE-2011-2197 at a Glance
How to Fix CVE-2011-2197
To remediate this vulnerability, upgrade all affected Actionpack dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade actionpack to 2.3.12
Upgrade actionpack to 3.0.8
Upgrade activesupport to 2.3.12
Upgrade activesupport to 3.0.8
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for actionpack
How to Check if You Are Affected
To determine whether your application is affected by CVE-2011-2197, inspect your project dependencies for Actionpack:
inspect dependencies for actionpack
Analyze the terminal output to locate any version of Actionpack in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.3.12), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Actionpack, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2011-2197 Affected Actionpack Versions
4 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
actionpack
|
RubyGems |
≥ 2.0.0
< 2.3.12
|
2.3.12
|
|
actionpack
|
RubyGems |
≥ 3.0.0
< 3.0.8
|
3.0.8
|
|
activesupport
|
RubyGems |
≥ 2.0.0
< 2.3.12
|
2.3.12
|
|
activesupport
|
RubyGems |
≥ 3.0.0
< 3.0.8
|
3.0.8
|
References
Frequently Asked Questions
What is CVE-2011-2197?
Which Actionpack versions are affected?
What version fixes CVE-2011-2197?
Is actionpack affected?
Is activesupport affected?
What CWE is associated with CVE-2011-2197?
How can I check RubyGems dependencies for CVE-2011-2197?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-v9v4-7jp6-8c73",
"modified" : "2023-04-20T21:47:18Z",
"published" : "2017-10-24T18:33:38Z",
"aliases" : [ "CVE-2011-2197" ],
"summary" : "rails Cross-site Scripting vulnerability",
"details" : "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" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "RubyGems",
"name" : "actionpack"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.0"
}, {
"fixed" : "2.3.12"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "< 2.3.11"
}
}, {
"package" : {
"ecosystem" : "RubyGems",
"name" : "actionpack"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.0.0"
}, {
"fixed" : "3.0.8"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "< 3.0.7"
}
}, {
"package" : {
"ecosystem" : "RubyGems",
"name" : "activesupport"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.0"
}, {
"fixed" : "2.3.12"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "< 2.3.11"
}
}, {
"package" : {
"ecosystem" : "RubyGems",
"name" : "activesupport"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.0.0"
}, {
"fixed" : "3.0.8"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "< 3.0.7"
}
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2011-2197"
}, {
"type" : "WEB",
"url" : "https://github.com/rails/rails/commit/53a2c0baf2b128dd4808eca313256f6f4bb8c4cd"
}, {
"type" : "WEB",
"url" : "https://github.com/rails/rails/commit/ed3796434af6069ced6a641293cf88eef3b284da"
}, {
"type" : "WEB",
"url" : "https://gist.github.com/NZKoz/b2ceb626fc2bcdfe497f"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/rails/rails"
}, {
"type" : "WEB",
"url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/activesupport/CVE-2011-2197.yml"
}, {
"type" : "WEB",
"url" : "http://groups.google.com/group/rubyonrails-security/msg/663b600d4471e0d4?dmode=source&output=gplain"
}, {
"type" : "WEB",
"url" : "http://lists.fedoraproject.org/pipermail/package-announce/2011-July/062514.html"
}, {
"type" : "WEB",
"url" : "http://lists.fedoraproject.org/pipermail/package-announce/2011-June/062090.html"
}, {
"type" : "WEB",
"url" : "http://openwall.com/lists/oss-security/2011/06/09/2"
}, {
"type" : "WEB",
"url" : "http://openwall.com/lists/oss-security/2011/06/13/9"
}, {
"type" : "WEB",
"url" : "http://weblog.rubyonrails.org/2011/6/8/potential-xss-vulnerability-in-ruby-on-rails-applications"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2020-06-16T21:57:17Z",
"nvd_published_at" : "2011-06-30T15:55:01Z"
}
}