CVE-2007-6612: Mongrel Path Traversal Vulnerability

MODERATE
Advisory Identifier: GHSA-m7r6-43v2-49vf
CWE-22
Published
Advisory Summary

CVE-2007-6612 is a MODERATE path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Mongrel libraries in the RubyGems ecosystem. The issue involves mongrel vulnerable to directory traversal via double-encoded sequences. Remediation is available by upgrading affected packages to version 1.0.5, 1.1.3.

CVE-2007-6612 at a Glance

CVE Identifier CVE-2007-6612
GHSA Identifier GHSA-m7r6-43v2-49vf
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 Mongrel
Package Ecosystem RubyGems
Published Date
Last Updated

How to Fix CVE-2007-6612

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

mongrel fixed: 1.0.5
Upgrade mongrel to 1.0.5
mongrel fixed: 1.1.3
Upgrade mongrel to 1.1.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 mongrel

How to Check if You Are Affected

To determine whether your application is affected by CVE-2007-6612, inspect your project dependencies for Mongrel:

inspect dependencies for mongrel

Analyze the terminal output to locate any version of Mongrel in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.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 Mongrel, 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 DirHandler (lib/mongrel/handlers.rb) in Mongrel 1.0.4 (1.0.3 and prior are not affected) and 1.1.x before 1.1.3 allows remote attackers to read arbitrary files via an HTTP request containing double-encoded sequences (`.%252e`).

CVE-2007-6612 Affected Mongrel Versions

2 component(s)
Fixed Versions:
1.0.51.1.3
Product / Package Ecosystem Affected Versions Fixed Version
mongrel
RubyGems
≥ 1.0.4
< 1.0.5
All 1 versions
1.0.4
1.0.5
mongrel
RubyGems
≥ 1.1.0
< 1.1.3
1.1.3

References

Frequently Asked Questions

What is CVE-2007-6612?
CVE-2007-6612 is a security vulnerability in Mongrel involving Mongrel vulnerable to directory traversal via double-encoded sequences under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which Mongrel versions are affected?
Affected versions include releases prior to 1.0.5, 1.1.3 across affected packages: mongrel.
What version fixes CVE-2007-6612?
Upgrading to 1.0.5, 1.1.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is mongrel affected?
Yes, mongrel is affected in releases prior to 1.0.5, 1.1.3. Upgrade your dependency to 1.0.5, 1.1.3 or later.
What CWE is associated with CVE-2007-6612?
CVE-2007-6612 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-2007-6612?
Run the dependency tree command: 'inspect dependencies for mongrel'. 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-m7r6-43v2-49vf",
  "modified" : "2023-09-21T23:19:53Z",
  "published" : "2022-05-01T18:44:39Z",
  "aliases" : [ "CVE-2007-6612" ],
  "summary" : "Mongrel vulnerable to directory traversal via double-encoded sequences",
  "details" : "Directory traversal vulnerability in DirHandler (lib/mongrel/handlers.rb) in Mongrel 1.0.4 (1.0.3 and prior are not affected) and 1.1.x before 1.1.3 allows remote attackers to read arbitrary files via an HTTP request containing double-encoded sequences (`.%252e`).",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "mongrel"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.0.4"
      }, {
        "fixed" : "1.0.5"
      } ]
    } ],
    "versions" : [ "1.0.4" ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "mongrel"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.1.0"
      }, {
        "fixed" : "1.1.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2007-6612"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/mongrel/mongrel"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apple.com/archives/security-announce/2008//May/msg00001.html"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20080111034049/http://rubyforge.org/pipermail/mongrel-users/2007-December/004743.html"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20200301091534/http://www.securityfocus.com/bid/27133"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-09-21T23:19:53Z",
    "nvd_published_at" : "2008-01-03T22:46:00Z"
  }
}