CVE-2016-4793: Cakephp/cakephp CakePHP Allows Remote Attackers To Vulnerability

HIGH
Advisory Identifier: GHSA-j8p3-8m69-2hqq
CVSS 7.5
CWE-20
Published
Advisory Summary

CVE-2016-4793 is a HIGH (CVSS 7.5) 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 spoof their ip. Remediation is available by upgrading affected packages to version 2.6.13, 2.7.11, 2.8.2, 3.0.17, 3.1.12, 3.2.5.

CVE-2016-4793 at a Glance

CVE Identifier CVE-2016-4793
GHSA Identifier GHSA-j8p3-8m69-2hqq
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-20: Improper Input Validation
Affected Product Cakephp/cakephp
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2016-4793

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: 2.6.13
Upgrade cakephp/cakephp to 2.6.13
cakephp/cakephp fixed: 2.7.11
Upgrade cakephp/cakephp to 2.7.11
cakephp/cakephp fixed: 2.8.2
Upgrade cakephp/cakephp to 2.8.2
cakephp/cakephp fixed: 3.0.17
Upgrade cakephp/cakephp to 3.0.17
cakephp/cakephp fixed: 3.1.12
Upgrade cakephp/cakephp to 3.1.12
cakephp/cakephp fixed: 3.2.5
Upgrade cakephp/cakephp to 3.2.5
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-2016-4793, 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 2.6.13), 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 `clientIp` function in CakePHP 3.2.4 and earlier allows remote attackers to spoof their IP via the `CLIENT-IP HTTP` header.

CVE-2016-4793 Affected Cakephp/cakephp Versions

6 component(s)
Fixed Versions:
2.6.132.7.112.8.23.0.173.1.123.2.5
Product / Package Ecosystem Affected Versions Fixed Version
cakephp/cakephp
Packagist
≥ 1.2.0
< 2.6.13
2.6.13
cakephp/cakephp
Packagist
≥ 2.7.0-rc1
< 2.7.11
2.7.11
cakephp/cakephp
Packagist
≥ 2.8.0-rc1
< 2.8.2
2.8.2
cakephp/cakephp
Packagist
≥ 3.0.0-rc1
< 3.0.17
3.0.17
cakephp/cakephp
Packagist
≥ 3.1.0-beta1
< 3.1.12
3.1.12
cakephp/cakephp
Packagist
≥ 3.2.0-rc1
< 3.2.5
3.2.5

References

Frequently Asked Questions

What is CVE-2016-4793?
CVE-2016-4793 is a security vulnerability in Cakephp/cakephp involving CakePHP allows remote attackers to spoof their IP under CWE-20: Improper Input Validation.
Which Cakephp/cakephp versions are affected?
Affected versions include releases prior to 2.6.13, 2.7.11, 2.8.2, 3.0.17, 3.1.12, 3.2.5 across affected packages: cakephp/cakephp.
What version fixes CVE-2016-4793?
Upgrading to 2.6.13, 2.7.11, 2.8.2, 3.0.17, 3.1.12, 3.2.5 (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 2.6.13, 2.7.11, 2.8.2, 3.0.17, 3.1.12, 3.2.5. Upgrade your dependency to 2.6.13, 2.7.11, 2.8.2, 3.0.17, 3.1.12, 3.2.5 or later.
What is the CVSS score of CVE-2016-4793?
CVE-2016-4793 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N.
What CWE is associated with CVE-2016-4793?
CVE-2016-4793 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-2016-4793?
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-j8p3-8m69-2hqq",
  "modified" : "2023-01-14T05:30:42Z",
  "published" : "2022-05-14T02:19:19Z",
  "aliases" : [ "CVE-2016-4793" ],
  "summary" : "CakePHP allows remote attackers to spoof their IP",
  "details" : "The `clientIp` function in CakePHP 3.2.4 and earlier allows remote attackers to spoof their IP via the `CLIENT-IP HTTP` header.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "cakephp/cakephp"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.2.0"
      }, {
        "fixed" : "2.6.13"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "cakephp/cakephp"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.7.0-rc1"
      }, {
        "fixed" : "2.7.11"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "cakephp/cakephp"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.8.0-rc1"
      }, {
        "fixed" : "2.8.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "cakephp/cakephp"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0.0-rc1"
      }, {
        "fixed" : "3.0.17"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "cakephp/cakephp"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.1.0-beta1"
      }, {
        "fixed" : "3.1.12"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "cakephp/cakephp"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.2.0-rc1"
      }, {
        "fixed" : "3.2.5"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2016-4793"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cakephp/cakephp/commit/908754649f70bab2b1093942e17c9a46a2fcf6c2"
  }, {
    "type" : "WEB",
    "url" : "https://bakery.cakephp.org/2016/03/13/cakephp_2613_2711_282_3017_3112_325_released.html"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/cakephp/cakephp"
  }, {
    "type" : "WEB",
    "url" : "https://support.citrix.com/article/CTX236992"
  }, {
    "type" : "WEB",
    "url" : "https://www.exploit-db.com/exploits/39813"
  }, {
    "type" : "WEB",
    "url" : "http://legalhackers.com/advisories/CakePHP-IP-Spoofing-Vulnerability.txt"
  }, {
    "type" : "WEB",
    "url" : "http://www.securityfocus.com/bid/95846"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-20" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-01-14T05:30:42Z",
    "nvd_published_at" : "2017-01-23T21:59:00Z"
  }
}