CVE-2014-7819: Sprockets Path Traversal Vulnerability

MODERATE
Advisory Identifier: GHSA-33pp-3763-mrfp
CWE-22
Published
Advisory Summary

CVE-2014-7819 is a MODERATE path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Sprockets libraries in the RubyGems ecosystem. The issue involves sprockets vulnerable to path traversal. Remediation is available by upgrading affected packages to version 2.0.5, 2.1.4, 2.2.3, 2.3.3, 2.4.6, 2.5.1, 2.7.1, 2.8.3, 2.9.4, 2.10.2, 2.11.3, 2.12.3.

CVE-2014-7819 at a Glance

CVE Identifier CVE-2014-7819
GHSA Identifier GHSA-33pp-3763-mrfp
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product Sprockets
Package Ecosystem RubyGems
Published Date
Last Updated

How to Fix CVE-2014-7819

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

sprockets fixed: 2.0.5
Upgrade sprockets to 2.0.5
sprockets fixed: 2.1.4
Upgrade sprockets to 2.1.4
sprockets fixed: 2.2.3
Upgrade sprockets to 2.2.3
sprockets fixed: 2.3.3
Upgrade sprockets to 2.3.3
sprockets fixed: 2.4.6
Upgrade sprockets to 2.4.6
sprockets fixed: 2.5.1
Upgrade sprockets to 2.5.1
sprockets fixed: 2.7.1
Upgrade sprockets to 2.7.1
sprockets fixed: 2.8.3
Upgrade sprockets to 2.8.3
sprockets fixed: 2.9.4
Upgrade sprockets to 2.9.4
sprockets fixed: 2.10.2
Upgrade sprockets to 2.10.2
sprockets fixed: 2.11.3
Upgrade sprockets to 2.11.3
sprockets fixed: 2.12.3
Upgrade sprockets to 2.12.3
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 sprockets

How to Check if You Are Affected

To determine whether your application is affected by CVE-2014-7819, inspect your project dependencies for Sprockets:

inspect dependencies for sprockets

Analyze the terminal output to locate any version of Sprockets in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.0.5), 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-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In Sprockets, 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

Multiple directory traversal vulnerabilities in `server.rb` in Sprockets before 2.0.5, 2.1.x before 2.1.4, 2.2.x before 2.2.3, 2.3.x before 2.3.3, 2.4.x before 2.4.6, 2.5.x before 2.5.1, 2.6.x and 2.7.x before 2.7.1, 2.8.x before 2.8.3, 2.9.x before 2.9.4, 2.10.x before 2.10.2, 2.11.x before 2.11.3, 2.12.x before 2.12.3, and 3.x before 3.0.0.beta.3, as distributed with Ruby on Rails 3.x and 4.x, allow remote attackers to determine the existence of files outside the application root via a ../ (dot dot slash) sequence with (1) double slashes or (2) URL encoding.

CVE-2014-7819 Affected Sprockets Versions

12 component(s)
Fixed Versions:
2.0.52.1.42.2.32.3.32.4.62.5.12.7.12.8.32.9.42.10.22.11.32.12.3
Product / Package Ecosystem Affected Versions Fixed Version
sprockets
RubyGems
< 2.0.5
2.0.5
sprockets
RubyGems
≥ 2.1.0
< 2.1.4
2.1.4
sprockets
RubyGems
≥ 2.2.0
< 2.2.3
2.2.3
sprockets
RubyGems
≥ 2.3.0
< 2.3.3
2.3.3
sprockets
RubyGems
≥ 2.4.0
< 2.4.6
2.4.6
sprockets
RubyGems
≥ 2.5.0
< 2.5.1
2.5.1
sprockets
RubyGems
≥ 2.6.0
< 2.7.1
2.7.1
sprockets
RubyGems
≥ 2.8.0
< 2.8.3
2.8.3
sprockets
RubyGems
≥ 2.9.0
< 2.9.4
2.9.4
sprockets
RubyGems
≥ 2.10.0
< 2.10.2
2.10.2
sprockets
RubyGems
≥ 2.11.0
< 2.11.3
2.11.3
sprockets
RubyGems
≥ 2.12.0
< 2.12.3
2.12.3

References

Frequently Asked Questions

What is CVE-2014-7819?
CVE-2014-7819 is a security vulnerability in Sprockets involving sprockets vulnerable to Path Traversal under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which Sprockets versions are affected?
Affected versions include releases prior to 2.0.5, 2.1.4, 2.2.3, 2.3.3, 2.4.6, 2.5.1, 2.7.1, 2.8.3, 2.9.4, 2.10.2, 2.11.3, 2.12.3 across affected packages: sprockets.
What version fixes CVE-2014-7819?
Upgrading to 2.0.5, 2.1.4, 2.2.3, 2.3.3, 2.4.6, 2.5.1, 2.7.1, 2.8.3, 2.9.4, 2.10.2, 2.11.3, 2.12.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is sprockets affected?
Yes, sprockets is affected in releases prior to 2.0.5, 2.1.4, 2.2.3, 2.3.3, 2.4.6, 2.5.1, 2.7.1, 2.8.3, 2.9.4, 2.10.2, 2.11.3, 2.12.3. Upgrade your dependency to 2.0.5, 2.1.4, 2.2.3, 2.3.3, 2.4.6, 2.5.1, 2.7.1, 2.8.3, 2.9.4, 2.10.2, 2.11.3, 2.12.3 or later.
What CWE is associated with CVE-2014-7819?
CVE-2014-7819 is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.).
How can I check RubyGems dependencies for CVE-2014-7819?
Run the dependency tree command: 'inspect dependencies for sprockets'. 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-33pp-3763-mrfp",
  "modified" : "2023-03-01T18:54:54Z",
  "published" : "2017-10-24T18:33:36Z",
  "aliases" : [ "CVE-2014-7819" ],
  "summary" : "sprockets vulnerable to Path Traversal",
  "details" : "Multiple directory traversal vulnerabilities in `server.rb` in Sprockets before 2.0.5, 2.1.x before 2.1.4, 2.2.x before 2.2.3, 2.3.x before 2.3.3, 2.4.x before 2.4.6, 2.5.x before 2.5.1, 2.6.x and 2.7.x before 2.7.1, 2.8.x before 2.8.3, 2.9.x before 2.9.4, 2.10.x before 2.10.2, 2.11.x before 2.11.3, 2.12.x before 2.12.3, and 3.x before 3.0.0.beta.3, as distributed with Ruby on Rails 3.x and 4.x, allow remote attackers to determine the existence of files outside the application root via a ../ (dot dot slash) sequence with (1) double slashes or (2) URL encoding.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "sprockets"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.0.5"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "sprockets"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.1.0"
      }, {
        "fixed" : "2.1.4"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "sprockets"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.2.0"
      }, {
        "fixed" : "2.2.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "sprockets"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.3.0"
      }, {
        "fixed" : "2.3.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "sprockets"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.4.0"
      }, {
        "fixed" : "2.4.6"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "sprockets"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.5.0"
      }, {
        "fixed" : "2.5.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "sprockets"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.6.0"
      }, {
        "fixed" : "2.7.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "sprockets"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.8.0"
      }, {
        "fixed" : "2.8.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "sprockets"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.9.0"
      }, {
        "fixed" : "2.9.4"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "sprockets"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.10.0"
      }, {
        "fixed" : "2.10.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "sprockets"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.11.0"
      }, {
        "fixed" : "2.11.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "sprockets"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.12.0"
      }, {
        "fixed" : "2.12.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2014-7819"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHBA-2015:1100"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/security/cve/CVE-2014-7819"
  }, {
    "type" : "WEB",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=1161527"
  }, {
    "type" : "WEB",
    "url" : "https://groups.google.com/forum/#!topic/rubyonrails-security/doAVp0YaTqY"
  }, {
    "type" : "WEB",
    "url" : "https://groups.google.com/forum/message/raw?msg=rubyonrails-security/doAVp0YaTqY/aHFngBqNBoAJ"
  }, {
    "type" : "WEB",
    "url" : "https://groups.google.com/forum/message/raw?msg=rubyonrails-security/wQBeGXqGs3E/JqUMB6fhh3gJ"
  }, {
    "type" : "WEB",
    "url" : "http://lists.opensuse.org/opensuse-updates/2014-11/msg00103.html"
  }, {
    "type" : "WEB",
    "url" : "http://lists.opensuse.org/opensuse-updates/2014-11/msg00105.html"
  }, {
    "type" : "WEB",
    "url" : "http://lists.opensuse.org/opensuse-updates/2014-11/msg00110.html"
  }, {
    "type" : "WEB",
    "url" : "http://lists.opensuse.org/opensuse-updates/2014-11/msg00111.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-16T20:53:55Z",
    "nvd_published_at" : "2014-11-08T11:55:00Z"
  }
}