CVE-2012-4399 — cakephp
HIGHCVE-2012-4399 is a high-severity (CVSS 7.5) XML External Entity (XXE) vulnerability in cakephp/cakephp. 3 public exploit or proof-of-concept references are indexed, so weaponization risk is real. A fix is available for cakephp/cakephp — see the affected versions and patch details below.
CakePHPallows remote attackers to read arbitrary files via XML data containing external entity references
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
cakephp/cakephp🐘cakephp/cakephpReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Packagist packages — download data is not available via public APIs for these ecosystems.
Description
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.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐘Packagist | cakephp/cakephp | ≥ 2.1.0-alpha&&< 2.1.5 | 2.1.5composer require cakephp/cakephp:^2.1.5 |
| 🐘Packagist | cakephp/cakephp | ≥ 2.2.0-beta&&< 2.2.1 | 2.2.1composer require cakephp/cakephp:^2.2.1 |
Affected Products
cakephpcakefoundationResearch use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
CakePHP 2.x < 2.2.0-RC2 - XML External Entity Injection
by Pawel Wylecial · Jul 16, 2012
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for cakephp/cakephp, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update cakephp/cakephp to 2.1.5 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2012-4399 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
Frequently Asked Questions
Is CVE-2012-4399 in your dependencies?
Find it across Packagist, including transitive dependencies.