CVE-2006-5031: Cakephp/cakephp Path Traversal Vulnerability

MODERATE
Advisory Identifier: GHSA-rw73-xmpv-j5x2
CWE-22
Published
Advisory Summary

CVE-2006-5031 is a MODERATE path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Cakephp/cakephp libraries in the Packagist ecosystem. The issue involves cakephp directory traversal vulnerability allows remote attackers to read arbitrary files. Remediation is available by upgrading affected packages to version 1.1.8.3544.

CVE-2006-5031 at a Glance

CVE Identifier CVE-2006-5031
GHSA Identifier GHSA-rw73-xmpv-j5x2
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 Cakephp/cakephp
Package Ecosystem Packagist
Published Date
Last Updated

How to Fix CVE-2006-5031

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

cakephp/cakephp fixed: 1.1.8.3544
Upgrade cakephp/cakephp to 1.1.8.3544
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 cakephp/cakephp

How to Check if You Are Affected

To determine whether your application is affected by CVE-2006-5031, inspect your project dependencies for Cakephp/cakephp:

inspect dependencies for cakephp/cakephp

Analyze the terminal output to locate any version of Cakephp/cakephp in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.1.8.3544), 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 Cakephp/cakephp, 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 `app/webroot/js/vendors.php` in Cake Software Foundation CakePHP before 1.1.8.3544 allows remote attackers to read arbitrary files via a `..` (dot dot) in the file parameter, followed by a filename ending with `%00` and a `.js` filename.

CVE-2006-5031 Affected Cakephp/cakephp Versions

1 component(s)
Fixed Versions:
1.1.8.3544
Product / Package Ecosystem Affected Versions Fixed Version
cakephp/cakephp
Packagist
≥ 1.0.1.2708
< 1.1.8.3544
1.1.8.3544

References

Frequently Asked Questions

What is CVE-2006-5031?
CVE-2006-5031 is a security vulnerability in Cakephp/cakephp involving CakePHP directory traversal vulnerability allows remote attackers to read arbitrary files under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which Cakephp/cakephp versions are affected?
Affected versions include releases prior to 1.1.8.3544 across affected packages: cakephp/cakephp.
What version fixes CVE-2006-5031?
Upgrading to 1.1.8.3544 (or the latest patched release for your respective branch) resolves the vulnerability.
Is cakephp/cakephp affected?
Yes, cakephp/cakephp is affected in releases prior to 1.1.8.3544. Upgrade your dependency to 1.1.8.3544 or later.
What CWE is associated with CVE-2006-5031?
CVE-2006-5031 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 Packagist dependencies for CVE-2006-5031?
Run the dependency tree command: 'inspect dependencies for cakephp/cakephp'. 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-rw73-xmpv-j5x2",
  "modified" : "2023-01-14T05:31:09Z",
  "published" : "2022-05-01T07:24:12Z",
  "aliases" : [ "CVE-2006-5031" ],
  "summary" : "CakePHP directory traversal vulnerability allows remote attackers to read arbitrary files",
  "details" : "Directory traversal vulnerability in `app/webroot/js/vendors.php` in Cake Software Foundation CakePHP before 1.1.8.3544 allows remote attackers to read arbitrary files via a `..` (dot dot) in the file parameter, followed by a filename ending with `%00` and a `.js` filename.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "cakephp/cakephp"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.0.1.2708"
      }, {
        "fixed" : "1.1.8.3544"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2006-5031"
  }, {
    "type" : "WEB",
    "url" : "https://exchange.xforce.ibmcloud.com/vulnerabilities/29115"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/cakephp/cakephp"
  }, {
    "type" : "WEB",
    "url" : "http://cakeforge.org/frs/shownotes.php?release_id=134"
  }, {
    "type" : "WEB",
    "url" : "http://secunia.com/advisories/22040"
  }, {
    "type" : "WEB",
    "url" : "http://www.gulftech.org/?node=research&article_id=00114-09212006"
  }, {
    "type" : "WEB",
    "url" : "http://www.securityfocus.com/bid/20150"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-01-14T05:31:09Z",
    "nvd_published_at" : "2006-09-27T23:07:00Z"
  }
}