Описание
Signal K Server Vulnerable to Unauthenticated Information Disclosure via Exposed Endpoints
[Note] This is a separate issue from the RCE vulnerability (State Pollution) currently being patched. While related to tokensecurity.js, it involves different endpoints and risks.
Summary
An unauthenticated information disclosure vulnerability allows any user to retrieve sensitive system information, including the full SignalK data schema, connected serial devices, and installed analyzer tools. This exposure facilitates reconnaissance for further attacks.
Details
The vulnerability stems from the fact that several sensitive API endpoints are not included in the authentication middleware's protection list in src/tokensecurity.js.
Vulnerable Code Analysis:
-
Missing Protection: The
tokensecurity.jsfile defines an array of paths that require authentication. However, the following paths defined insrc/serverroutes.tsare missing from this list:/skServer/serialports/skServer/availablePaths/skServer/hasAnalyzer
-
Unrestricted Access: Because they are missing from the protection list, the
http_authorizemiddleware allows access to these paths even whenenableSecurityis set totrue.
Exploit Scenario:
- Reconnaissance: An attacker scans the server for these endpoints.
- Data Extraction:
- Querying
/skServer/availablePathsreturns the full JSON schema of the vessel's data (e.g.,environment.sun.sunrise,navigation.position), allowing the attacker to know exactly what data points are available for targeting. - Querying
/skServer/serialportsreveals connected hardware (e.g.,/dev/ttyUSB0), aiding in physical device targeting.
- Querying
PoC
The following Python script demonstrates the vulnerability by querying the exposed endpoints without any authentication headers.
Expected Result:
The script will output [!] VULNERABLE for all three endpoints, showing snippets of the leaked JSON data.
Impact
Verified Information Disclosure: During our verification, we successfully retrieved the following sensitive information without any authentication:
- Full Data Schema: The
/skServer/availablePathsendpoint returned the complete JSON schema of the vessel's data.- Example:
environment.sun.sunrise,navigation.position - Leakage of Internal State: We also observed entries like
notifications.security.accessRequest.readwrite.attacker-device-32, which revealed the presence and IDs of pending access requests (traces of our DoS attack), showing that internal server state is exposed.
- Example:
- Hardware Configuration: The
/skServer/serialportsendpoint exposed the list of connected serial devices. - System Capabilities: The
/skServer/hasAnalyzerendpoint revealed whether traffic analysis tools were installed.
This information allows an attacker to map the system's internal state and capabilities, significantly facilitating further targeted attacks (Reconnaissance).
Remediation
Update src/tokensecurity.js
Add the missing paths to the list of protected routes in src/tokensecurity.js.
Пакеты
signalk-server
< 2.19.0
2.19.0
Связанные уязвимости
Signal K Server is a server application that runs on a central hub in a boat. An unauthenticated information disclosure vulnerability in versions prior to 2.19.0 allows any user to retrieve sensitive system information, including the full SignalK data schema, connected serial devices, and installed analyzer tools. This exposure facilitates reconnaissance for further attacks. Version 2.19.0 patches the issue.