GHSA-4xm8-rg9h-jhq2 - Signal K resources API path traversal can disclose the JWT signing secret and enable remote code execution
### Summary
Path traversal in the Signal K resources and applicationData APIs lets an
unauthenticated or low-privileged user read, write and delete files outside
the storage root. Reading <config>/security.json discloses the JWT signing
secret, enabling admin token forgery and remote code execution.
### Details
## Description
The v2 REST resources API `GET /signalk/v2/api/resources/:resourceType/:resourceId` passes `resourceId` to `FileStore.getResource()` without validation. `getResource()` builds the file path with `path.join(this.resources[type].path, itemUuid)` followed by `readFile` + `JSON.parse`, so a `%2F`-encoded multi-level traversal (`..%2F..%2F..%2F..%2F`) escapes the resource storage directory and returns any JSON file on the server (source: `src/api/resources/index.ts:559-600`, `packages/resources-provider-plugin/src/filestorage.ts:115-125`).
Because the JWT signing secret is stored in plaintext in `<config>/security.json` (generated at `src/tokensecurity.ts:271`, persisted via `saveSecurityConfig` at `src/security.ts:377`), an unauthenticated attacker on deployments with `allow_readonly=true` (a supported, UI-toggleable configuration granting anonymous read access) can:
1. **Read `<config>/security.json`** โ disclosing the JWT signing secret (512-hex) and user password hashes.
2. **Forge an admin JWT** โ HS256-sign `{"id":"admin"}` with the disclosed secret; accepted by `/skServer/loginStatus` (`userLevel: "admin"`) and all admin-protected endpoints (`adminAuthenticationMiddleware`, `src/tokensecurity.ts:593`, applied at `src/tokensecurity.ts:953`).
3. **Gain remote code execution** โ `POST /skServer/providers` (admin) accepts a provider of type `Execute`; `packages/streams/src/execute.ts:93` executes it via `spawn('sh', ['-c', command])` at creation time. The provider persists to `settings.json` and survives restarts.
On default deployments (`allow_readonly=false`), step 1 returns 401 to anonymous users but succeeds with any readonly user tok
CRITICAL
Severity & confidence
Source severitycritical
Platform severitycritical
Confidencemedium
Exploitationunknown
CVSS9.8
Affected
Vendorssignalk-server@signalk
Productssignalk-server@signalk/resources-provider
Reporting sources (1)
GitHub Security Advisories
Timeline & provenance
Published2026-10-30T22:57:22
Last updated2026-11-09T09:35:06
Ingested2026-10-30T22:59:14
FreshnessNEAR-REAL-TIME
Threat typeadvisory
Recommended action
Review the advisory and upgrade affected packages to the first patched version.
Next steps
- Identify affected systems in your environment.
- Apply the vendor patch or mitigation guidance.
- Review logs for indicators described in the advisory.
- Follow the affected vendor/product to track updates.
Confidence explanation
Reported by a single or secondary source; treat as indicative, verify before acting.
Source type: vendor ยท Original: GitHub Security Advisories