CVE-2011-4319: Actionpack Cross-Site Scripting Vulnerability

MODERATE
Advisory Identifier: GHSA-xxr8-833v-c7wc
CWE-79
Published
Advisory Summary

CVE-2011-4319 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 cross-site scripting vulnerability in i18n translations helper method. Remediation is available by upgrading affected packages to version 3.0.11, 3.1.2.

CVE-2011-4319 at a Glance

CVE Identifier CVE-2011-4319
GHSA Identifier GHSA-xxr8-833v-c7wc
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Actionpack
Package Ecosystem RubyGems
Published Date
Last Updated

How to Fix CVE-2011-4319

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.

actionpack fixed: 3.0.11
Upgrade actionpack to 3.0.11
actionpack fixed: 3.1.2
Upgrade actionpack to 3.1.2
Verify Direct and Transitive Dependencies

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-4319, 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 3.0.11), 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

Cross-site scripting (XSS) vulnerability in the i18n translations helper method in Ruby on Rails 3.0.x before 3.0.11 and 3.1.x before 3.1.2, and the rails_xss plugin in Ruby on Rails 2.3.x, allows remote attackers to inject arbitrary web script or HTML via vectors related to a translations string whose name ends with an "html" substring.

CVE-2011-4319 Affected Actionpack Versions

2 component(s)
Fixed Versions:
3.0.113.1.2
Product / Package Ecosystem Affected Versions Fixed Version
actionpack
RubyGems
≥ 3.0.0
< 3.0.11
3.0.11
actionpack
RubyGems
≥ 3.1.0
< 3.1.2
3.1.2

References

NVD — CVE-2011-4319 NVD
https://nvd.nist.gov/vuln/detail/CVE-2011-4319
Security Fix Commit FIX COMMIT
https://github.com/rails/rails/commit/2d5b105d4bcb652550dda8b5613376d1b8beb70c
Security Fix Commit FIX COMMIT
https://github.com/rails/rails/commit/ba2d85012088fd0db0fab98b2e512c77c83cbade
exchange.xforce.ibmcloud.com/vulnerabilities/713... WEB
https://exchange.xforce.ibmcloud.com/vulnerabilities/71364
Actionpack Source Repository REPOSITORY
https://github.com/rails/rails
Actionpack Source Repository REPOSITORY
https://github.com/rubysec/ruby-advisory-db/blob/master/gems/actionpack/CVE-2011-4319.yml
groups.google.com/forum/ WEB
https://groups.google.com/forum/#!topic/rubyonrails-security/K2HXD7c8fMU
Actionpack Security Information SECURITY
https://web.archive.org/web/20200228155840/http://www.securityfocus.com/bid/50722
Actionpack Security Information SECURITY
http://openwall.com/lists/oss-security/2011/11/18/8
Actionpack Security Information SECURITY
https://web.archive.org/web/20210307005941/http://www.securitytracker.com/id?1026342
Actionpack Security Information SECURITY
http://groups.google.com/group/rubyonrails-security/browse_thread/thread/2b61d70fb73c7cc5?pli=1
Actionpack Security Information SECURITY
http://groups.google.com/group/rubyonrails-security/msg/c65c24fbc4b6dd82?dmode=source&output=gplain
weblog.rubyonrails.org/2011/11/18/rails-3-... WEB
http://weblog.rubyonrails.org/2011/11/18/rails-3-0-11-has-been-released
weblog.rubyonrails.org/2011/11/18/rails-3-... WEB
http://weblog.rubyonrails.org/2011/11/18/rails-3-1-2-has-been-released

Frequently Asked Questions

What is CVE-2011-4319?
CVE-2011-4319 is a security vulnerability in Actionpack involving Cross-site Scripting vulnerability in i18n translations helper method under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Actionpack versions are affected?
Affected versions include releases prior to 3.0.11, 3.1.2 across affected packages: actionpack.
What version fixes CVE-2011-4319?
Upgrading to 3.0.11, 3.1.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is actionpack affected?
Yes, actionpack is affected in releases prior to 3.0.11, 3.1.2. Upgrade your dependency to 3.0.11, 3.1.2 or later.
What CWE is associated with CVE-2011-4319?
CVE-2011-4319 is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (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.).
How can I check RubyGems dependencies for CVE-2011-4319?
Run the dependency tree command: 'inspect dependencies for actionpack'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-xxr8-833v-c7wc",
  "modified" : "2023-05-26T21:06:30Z",
  "published" : "2017-10-24T18:33:38Z",
  "aliases" : [ "CVE-2011-4319" ],
  "summary" : "Cross-site Scripting vulnerability in i18n translations helper method",
  "details" : "Cross-site scripting (XSS) vulnerability in the i18n translations helper method in Ruby on Rails 3.0.x before 3.0.11 and 3.1.x before 3.1.2, and the rails_xss plugin in Ruby on Rails 2.3.x, allows remote attackers to inject arbitrary web script or HTML via vectors related to a translations string whose name ends with an \"html\" substring.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "actionpack"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0.0"
      }, {
        "fixed" : "3.0.11"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "actionpack"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.1.0"
      }, {
        "fixed" : "3.1.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2011-4319"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rails/rails/commit/2d5b105d4bcb652550dda8b5613376d1b8beb70c"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rails/rails/commit/ba2d85012088fd0db0fab98b2e512c77c83cbade"
  }, {
    "type" : "WEB",
    "url" : "https://exchange.xforce.ibmcloud.com/vulnerabilities/71364"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/rails/rails"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/actionpack/CVE-2011-4319.yml"
  }, {
    "type" : "WEB",
    "url" : "https://groups.google.com/forum/#!topic/rubyonrails-security/K2HXD7c8fMU"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20200228155840/http://www.securityfocus.com/bid/50722"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20210307005941/http://www.securitytracker.com/id?1026342"
  }, {
    "type" : "WEB",
    "url" : "http://groups.google.com/group/rubyonrails-security/browse_thread/thread/2b61d70fb73c7cc5?pli=1"
  }, {
    "type" : "WEB",
    "url" : "http://groups.google.com/group/rubyonrails-security/msg/c65c24fbc4b6dd82?dmode=source&output=gplain"
  }, {
    "type" : "WEB",
    "url" : "http://openwall.com/lists/oss-security/2011/11/18/8"
  }, {
    "type" : "WEB",
    "url" : "http://weblog.rubyonrails.org/2011/11/18/rails-3-0-11-has-been-released"
  }, {
    "type" : "WEB",
    "url" : "http://weblog.rubyonrails.org/2011/11/18/rails-3-1-2-has-been-released"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-16T22:04:59Z",
    "nvd_published_at" : "2011-11-28T11:55:09Z"
  }
}