CVE-2010-4335: Cakephp/cakephp CakePHP Allows Remote Attackers To Vulnerability

HIGH
Advisory Identifier: GHSA-g2vx-8v47-4vhh
CWE-20
Published
Advisory Summary

CVE-2010-4335 is a HIGH cakephp allows remote attackers to vulnerability (CWE-20: Improper Input Validation) affecting Cakephp/cakephp libraries in the Packagist ecosystem. The issue involves cakephp allows remote attackers to modify internal cake cache and execute arbitrary code. Remediation is available by upgrading affected packages to version 1.3.6.

CVE-2010-4335 at a Glance

CVE Identifier CVE-2010-4335
GHSA Identifier GHSA-g2vx-8v47-4vhh
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-20: Improper Input Validation
Affected Product Cakephp/cakephp
Package Ecosystem Packagist
Published Date
Last Updated

How to Fix CVE-2010-4335

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.3.6
Upgrade cakephp/cakephp to 1.3.6
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-2010-4335, 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.3.6), 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-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. 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

The `_validatePost` function in `libs/controller/components/security.php` in CakePHP 1.3.x through 1.3.5 and 1.2.8 allows remote attackers to modify the internal Cake cache and execute arbitrary code via a crafted `data[_Token][fields]` value that is processed by the unserialize function, as demonstrated by modifying the `file_map` cache to execute arbitrary local files.

CVE-2010-4335 Affected Cakephp/cakephp Versions

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

References

Frequently Asked Questions

What is CVE-2010-4335?
CVE-2010-4335 is a security vulnerability in Cakephp/cakephp involving CakePHP allows remote attackers to modify internal Cake cache and execute arbitrary code under CWE-20: Improper Input Validation.
Which Cakephp/cakephp versions are affected?
Affected versions include releases prior to 1.3.6 across affected packages: cakephp/cakephp.
What version fixes CVE-2010-4335?
Upgrading to 1.3.6 (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.3.6. Upgrade your dependency to 1.3.6 or later.
What CWE is associated with CVE-2010-4335?
CVE-2010-4335 is classified under CWE-20: Improper Input Validation (The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.).
How can I check Packagist dependencies for CVE-2010-4335?
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-g2vx-8v47-4vhh",
  "modified" : "2023-01-14T05:29:31Z",
  "published" : "2022-05-17T05:44:11Z",
  "aliases" : [ "CVE-2010-4335" ],
  "summary" : "CakePHP allows remote attackers to modify internal Cake cache and execute arbitrary code",
  "details" : "The `_validatePost` function in `libs/controller/components/security.php` in CakePHP 1.3.x through 1.3.5 and 1.2.8 allows remote attackers to modify the internal Cake cache and execute arbitrary code via a crafted `data[_Token][fields]` value that is processed by the unserialize function, as demonstrated by modifying the `file_map` cache to execute arbitrary local files.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "cakephp/cakephp"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.2.8"
      }, {
        "fixed" : "1.3.6"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2010-4335"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cakephp/cakephp/commit/e431e86aa4301ced4273dc7919b59362cbb353cb"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/cakephp/cakephp"
  }, {
    "type" : "WEB",
    "url" : "http://malloc.im/CakePHP-unserialize.txt"
  }, {
    "type" : "WEB",
    "url" : "http://packetstormsecurity.org/files/view/95847/burnedcake.py.txt"
  }, {
    "type" : "WEB",
    "url" : "http://secunia.com/advisories/42211"
  }, {
    "type" : "WEB",
    "url" : "http://securityreason.com/securityalert/8026"
  }, {
    "type" : "WEB",
    "url" : "http://www.exploit-db.com/exploits/16011"
  }, {
    "type" : "WEB",
    "url" : "http://www.osvdb.org/69352"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-20" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-01-14T05:29:31Z",
    "nvd_published_at" : "2011-01-14T23:00:00Z"
  }
}