CVE-2014-7829: Actionpack Path Traversal Vulnerability

MODERATE
Advisory Identifier: GHSA-h56m-vwxc-3qpw
CWE-22
Published
Advisory Summary

CVE-2014-7829 is a MODERATE path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Actionpack libraries in the RubyGems ecosystem. The issue involves directory traversal vulnerability in actionpack. Remediation is available by upgrading affected packages to version 4.1.8, 3.2.21, 4.0.12, 4.2.0.beta4.

CVE-2014-7829 at a Glance

CVE Identifier CVE-2014-7829
GHSA Identifier GHSA-h56m-vwxc-3qpw
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 Actionpack
Package Ecosystem RubyGems
Published Date
Last Updated

How to Fix CVE-2014-7829

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: 4.1.8
Upgrade actionpack to 4.1.8
actionpack fixed: 3.2.21
Upgrade actionpack to 3.2.21
actionpack fixed: 4.0.12
Upgrade actionpack to 4.0.12
actionpack fixed: 4.2.0.beta4
Upgrade actionpack to 4.2.0.beta4
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-2014-7829, 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 4.1.8), 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 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

Directory traversal vulnerability in actionpack/lib/action_dispatch/middleware/static.rb in Action Pack in Ruby on Rails 3.x before 3.2.21, 4.0.x before 4.0.12, 4.1.x before 4.1.8, and 4.2.x before 4.2.0.beta4, when serve_static_assets is enabled, allows remote attackers to determine the existence of files outside the application root via vectors involving a \ (backslash) character, a similar issue to CVE-2014-7818.

CVE-2014-7829 Affected Actionpack Versions

4 component(s)
Fixed Versions:
4.1.83.2.214.0.124.2.0.beta4
Product / Package Ecosystem Affected Versions Fixed Version
actionpack
RubyGems
≥ 4.1.0
< 4.1.8
4.1.8
actionpack
RubyGems
≥ 3.0.0
< 3.2.21
3.2.21
actionpack
RubyGems
≥ 4.0.0
< 4.0.12
4.0.12
actionpack
RubyGems
≥ 4.2.0.beta1
< 4.2.0.beta4
4.2.0.beta4

References

Frequently Asked Questions

What is CVE-2014-7829?
CVE-2014-7829 is a security vulnerability in Actionpack involving Directory traversal vulnerability in actionpack under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which Actionpack versions are affected?
Affected versions include releases prior to 4.1.8, 3.2.21, 4.0.12, 4.2.0.beta4 across affected packages: actionpack.
What version fixes CVE-2014-7829?
Upgrading to 4.1.8, 3.2.21, 4.0.12, 4.2.0.beta4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is actionpack affected?
Yes, actionpack is affected in releases prior to 4.1.8, 3.2.21, 4.0.12, 4.2.0.beta4. Upgrade your dependency to 4.1.8, 3.2.21, 4.0.12, 4.2.0.beta4 or later.
What CWE is associated with CVE-2014-7829?
CVE-2014-7829 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-7829?
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-h56m-vwxc-3qpw",
  "modified" : "2023-08-25T19:56:49Z",
  "published" : "2017-10-24T18:33:36Z",
  "aliases" : [ "CVE-2014-7829" ],
  "summary" : "Directory traversal vulnerability in actionpack",
  "details" : "Directory traversal vulnerability in actionpack/lib/action_dispatch/middleware/static.rb in Action Pack in Ruby on Rails 3.x before 3.2.21, 4.0.x before 4.0.12, 4.1.x before 4.1.8, and 4.2.x before 4.2.0.beta4, when serve_static_assets is enabled, allows remote attackers to determine the existence of files outside the application root via vectors involving a \\ (backslash) character, a similar issue to CVE-2014-7818.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "actionpack"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.1.0"
      }, {
        "fixed" : "4.1.8"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "actionpack"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0.0"
      }, {
        "fixed" : "3.2.21"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "actionpack"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.0.0"
      }, {
        "fixed" : "4.0.12"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "actionpack"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.2.0.beta1"
      }, {
        "fixed" : "4.2.0.beta4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2014-7829"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-h56m-vwxc-3qpw"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/actionpack/CVE-2014-7829.yml"
  }, {
    "type" : "WEB",
    "url" : "https://groups.google.com/forum/#!topic/rubyonrails-security/rMTQy4oRCGk"
  }, {
    "type" : "WEB",
    "url" : "https://groups.google.com/forum/message/raw?msg=rubyonrails-security/rMTQy4oRCGk/loS_CRS8mNEJ"
  }, {
    "type" : "WEB",
    "url" : "https://puppet.com/security/cve/cve-2014-7829"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20160403085126/http://www.securityfocus.com/bid/71183"
  }, {
    "type" : "WEB",
    "url" : "http://lists.opensuse.org/opensuse-updates/2014-11/msg00112.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-17T16:30:46Z",
    "nvd_published_at" : "2014-11-18T23:59:00Z"
  }
}