CVE-2014-2538: Rack ssl Cross-Site Scripting Vulnerability

MODERATE
Advisory Identifier: GHSA-v3rr-cph9-2g2q
CWE-79
Published
Advisory Summary

CVE-2014-2538 is a MODERATE cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Rack ssl libraries in the RubyGems ecosystem. The issue involves rack-ssl cross-site scripting vulnerability. Remediation is available by upgrading affected packages to version 1.4.0.

CVE-2014-2538 at a Glance

CVE Identifier CVE-2014-2538
GHSA Identifier GHSA-v3rr-cph9-2g2q
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 Rack ssl
Package Ecosystem RubyGems
Published Date
Last Updated

How to Fix CVE-2014-2538

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

rack-ssl fixed: 1.4.0
Upgrade rack-ssl to 1.4.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 rack-ssl

How to Check if You Are Affected

To determine whether your application is affected by CVE-2014-2538, inspect your project dependencies for Rack ssl:

inspect dependencies for rack-ssl

Analyze the terminal output to locate any version of Rack ssl in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.4.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 Rack ssl, 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 `lib/rack/ssl.rb` in the rack-ssl gem before 1.4.0 for Ruby allows remote attackers to inject arbitrary web script or HTML via a URI, which might not be properly handled by third-party adapters such as JRuby-Rack.

CVE-2014-2538 Affected Rack ssl Versions

1 component(s)
Fixed Versions:
1.4.0
Product / Package Ecosystem Affected Versions Fixed Version
rack-ssl
RubyGems
< 1.4.0
1.4.0

References

Frequently Asked Questions

What is CVE-2014-2538?
CVE-2014-2538 is a security vulnerability in Rack ssl involving rack-ssl Cross-site Scripting vulnerability under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Rack ssl versions are affected?
Affected versions include releases prior to 1.4.0 across affected packages: rack-ssl.
What version fixes CVE-2014-2538?
Upgrading to 1.4.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is rack-ssl affected?
Yes, rack-ssl is affected in releases prior to 1.4.0. Upgrade your dependency to 1.4.0 or later.
What CWE is associated with CVE-2014-2538?
CVE-2014-2538 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-2538?
Run the dependency tree command: 'inspect dependencies for rack-ssl'. 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-v3rr-cph9-2g2q",
  "modified" : "2025-04-13T23:03:25Z",
  "published" : "2017-10-24T18:33:36Z",
  "aliases" : [ "CVE-2014-2538" ],
  "summary" : "rack-ssl Cross-site Scripting vulnerability",
  "details" : "Cross-site scripting (XSS) vulnerability in `lib/rack/ssl.rb` in the rack-ssl gem before 1.4.0 for Ruby allows remote attackers to inject arbitrary web script or HTML via a URI, which might not be properly handled by third-party adapters such as JRuby-Rack.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "rack-ssl"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.4.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2014-2538"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/josh/rack-ssl/commit/9d7d7300b907e496db68d89d07fbc2e0df0b487b"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/josh/rack-ssl"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rack-ssl/CVE-2014-2538.yml"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20140524002455/http://secunia.com/advisories/57466"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20200228185649/http://www.securityfocus.com/bid/66314"
  }, {
    "type" : "WEB",
    "url" : "http://lists.opensuse.org/opensuse-updates/2014-04/msg00032.html"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2014/03/19/20"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-16T21:56:31Z",
    "nvd_published_at" : "2014-03-25T18:21:48Z"
  }
}