CVE-2012-4399: Cakephp/cakephp CakePHPallows Remote Attackers To Read Vulnerability
HIGHCVE-2012-4399 is a HIGH (CVSS 7.5) cakephpallows remote attackers to read vulnerability (CWE-611: Improper Restriction of XML External Entity Reference) affecting Cakephp/cakephp libraries in the Packagist ecosystem. The issue involves cakephpallows remote attackers to read arbitrary files via xml data containing external entity references. Remediation is available by upgrading affected packages to version 2.1.5, 2.2.1.
CVE-2012-4399 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N).
How to Fix CVE-2012-4399
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.
Upgrade cakephp/cakephp to 2.1.5
Upgrade cakephp/cakephp to 2.2.1
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-2012-4399, 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.1.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-611: Improper Restriction of XML External Entity Reference, where the product processes an xml document that can contain xml entities with uris that resolve to documents outside of the intended sphere of control, causing the product to embed incorrect documents into its output. 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
CVE-2012-4399 Affected Cakephp/cakephp Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
cakephp/cakephp
|
Packagist |
≥ 2.1.0-alpha
< 2.1.5
|
2.1.5
|
|
cakephp/cakephp
|
Packagist |
≥ 2.2.0-beta
< 2.2.1
|
2.2.1
|
References
Frequently Asked Questions
What is CVE-2012-4399?
Which Cakephp/cakephp versions are affected?
What version fixes CVE-2012-4399?
Is cakephp/cakephp affected?
What is the CVSS score of CVE-2012-4399?
What CWE is associated with CVE-2012-4399?
How can I check Packagist dependencies for CVE-2012-4399?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-5964-pq8r-4q62",
"modified" : "2024-04-09T14:17:43Z",
"published" : "2022-05-17T05:07:14Z",
"aliases" : [ "CVE-2012-4399" ],
"summary" : "CakePHPallows remote attackers to read arbitrary files via XML data containing external entity references",
"details" : "The Xml class in CakePHP 2.1.x before 2.1.5 and 2.2.x before 2.2.1 allows remote attackers to read arbitrary files via XML data containing external entity references, aka an XML external entity (XXE) injection attack.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "cakephp/cakephp"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.1.0-alpha"
}, {
"fixed" : "2.1.5"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "cakephp/cakephp"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.2.0-beta"
}, {
"fixed" : "2.2.1"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2012-4399"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/cakephp/cakephp"
}, {
"type" : "WEB",
"url" : "http://bakery.cakephp.org/articles/markstory/2012/07/14/security_release_-_cakephp_2_1_5_2_2_1"
}, {
"type" : "WEB",
"url" : "http://seclists.org/bugtraq/2012/Jul/101"
}, {
"type" : "WEB",
"url" : "http://secunia.com/advisories/49900"
}, {
"type" : "WEB",
"url" : "http://www.exploit-db.com/exploits/19863"
}, {
"type" : "WEB",
"url" : "http://www.openwall.com/lists/oss-security/2012/09/03/1"
}, {
"type" : "WEB",
"url" : "http://www.openwall.com/lists/oss-security/2012/09/03/2"
}, {
"type" : "WEB",
"url" : "http://www.osvdb.org/84042"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-611" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2023-01-14T05:30:14Z",
"nvd_published_at" : "2012-10-09T23:55:00Z"
}
}