CVE-2014-4920: Twitter bootstrap rails Cross-Site Scripting Vulnerability

MODERATE
Advisory Identifier: GHSA-vpqv-mqvc-pcx2
CWE-79
Published
Advisory Summary

CVE-2014-4920 is a MODERATE cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Twitter bootstrap rails libraries in the RubyGems ecosystem. The issue involves reflective cross-site scripting vulnerability in twitter-bootstrap-rails. Remediation is available by upgrading affected packages to version 3.2.0.

CVE-2014-4920 at a Glance

CVE Identifier CVE-2014-4920
GHSA Identifier GHSA-vpqv-mqvc-pcx2
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 Twitter bootstrap rails
Package Ecosystem RubyGems
Published Date
Last Updated

How to Fix CVE-2014-4920

To remediate this vulnerability, upgrade all affected Twitter bootstrap rails dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

twitter-bootstrap-rails fixed: 3.2.0
Upgrade twitter-bootstrap-rails to 3.2.0
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 twitter-bootstrap-rails

How to Check if You Are Affected

To determine whether your application is affected by CVE-2014-4920, inspect your project dependencies for Twitter bootstrap rails:

inspect dependencies for twitter-bootstrap-rails

Analyze the terminal output to locate any version of Twitter bootstrap rails in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.2.0), 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 Twitter bootstrap rails, 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

The twitter-bootstrap-rails Gem for Rails contains a flaw that enables a reflected cross-site scripting (XSS) attack. This flaw exists because the bootstrap_flash helper method does not validate input when handling flash messages before returning it to users. This may allow a context-dependent attacker to create a specially crafted request that would execute arbitrary script code in a user's browser session within the trust relationship between their browser and the server.

CVE-2014-4920 Affected Twitter bootstrap rails Versions

1 component(s)
Fixed Versions:
3.2.0
Product / Package Ecosystem Affected Versions Fixed Version
twitter-bootstrap-rails
RubyGems
< 3.2.0
3.2.0

References

Frequently Asked Questions

What is CVE-2014-4920?
CVE-2014-4920 is a security vulnerability in Twitter bootstrap rails involving Reflective Cross-site Scripting Vulnerability in twitter-bootstrap-rails under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Twitter bootstrap rails versions are affected?
Affected versions include releases prior to 3.2.0 across affected packages: twitter-bootstrap-rails.
What version fixes CVE-2014-4920?
Upgrading to 3.2.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is twitter-bootstrap-rails affected?
Yes, twitter-bootstrap-rails is affected in releases prior to 3.2.0. Upgrade your dependency to 3.2.0 or later.
What CWE is associated with CVE-2014-4920?
CVE-2014-4920 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-2014-4920?
Run the dependency tree command: 'inspect dependencies for twitter-bootstrap-rails'. 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-vpqv-mqvc-pcx2",
  "modified" : "2023-03-16T18:35:11Z",
  "published" : "2023-03-16T18:35:11Z",
  "aliases" : [ "CVE-2014-4920" ],
  "summary" : "Reflective Cross-site Scripting Vulnerability in twitter-bootstrap-rails",
  "details" : "The twitter-bootstrap-rails Gem for Rails contains a flaw that enables a\nreflected cross-site scripting (XSS) attack. This flaw exists because the\nbootstrap_flash helper method does not validate input when handling flash\nmessages before returning it to users. This may allow a context-dependent\nattacker to create a specially crafted request that would execute arbitrary\nscript code in a user's browser session within the trust relationship between\ntheir browser and the server.\n",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "twitter-bootstrap-rails"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.2.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/twitter-bootstrap-rails/CVE-2014-4920.yml"
  }, {
    "type" : "WEB",
    "url" : "https://nvisium.com/blog/2014/03/28/reflected-xss-vulnerability-in-twitter"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-03-16T18:35:11Z",
    "nvd_published_at" : null
  }
}