Miggo Logo

CVE-2020-35239: CakePHP allows method override parameters to bypass CSRF checks

8.8

CVSS Score
3.1

Basic Information

EPSS Score
0.25361%
Published
5/24/2022
Updated
1/30/2023
KEV Status
No
Technology
TechnologyPHP

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
cakephp/cakephpcomposer>= 4.0.0, < 4.0.104.0.10
cakephp/cakephpcomposer>= 4.1.0, < 4.1.44.1.4

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot 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.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

* vuln*r**ility *xists in **k*P*P v*rsions *.*.x t*rou** *.*.*. T** *sr*Prot**tionMi**l*w*r* *ompon*nt *llows m*t*o* ov*rri** p*r*m*t*rs to *yp*ss *SR* ****ks *y ***n*in* t** *TTP r*qu*st m*t*o* to *n *r*itr*ry strin* t**t is not in t** list o* r*qu*

Reasoning

T** vuln*r**ility *ris*s *rom two k*y issu*s: *) `S*rv*rR*qu*st::**t**tM*t*o*` *llow** *r*itr*ry m*t*o* ov*rri**s wit*out v*li**tion, *n**lin* *tt**k*rs to *r**t non-*TTP m*t*o*s. *) `*sr*Prot**tionMi**l*w*r*::pro**ss` only p*r*orm** *SR* ****ks *or