CVE-2020-35239: CakePHP allows method override parameters to bypass CSRF checks
8.8
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.25361%
CWE
Published
5/24/2022
Updated
1/30/2023
KEV Status
No
Technology
PHP
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
cakephp/cakephp | composer | >= 4.0.0, < 4.0.10 | 4.0.10 |
cakephp/cakephp | composer | >= 4.1.0, < 4.1.4 | 4.1.4 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability arises from two key issues: 1) ServerRequest::detectMethod
allowed arbitrary method overrides without validation, enabling attackers to craft non-HTTP methods. 2) CsrfProtectionMiddleware::process
only performed CSRF checks for a predefined list of methods. Combined, these allowed attackers to bypass CSRF protections by setting an invalid method. The patched versions added validation in detectMethod
and ensured CSRF checks account for valid HTTP methods.