Critical, CVSS 9.8npmAmendedPublished
Signal K resources API path traversal can disclose the JWT signing secret and enable remote code execution
GHSA-4xm8-rg9h-jhq2
- Affected
- npm @signalk/resources-provider >= 1.0.0, < 1.5.3
- Fixed in
- 1.5.3· Vendor fix available
- Issue
- 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 /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 ` /security.json` (generated at `src/tokensecurity.ts:271`, persisted via…
Recommended action: Upgrade to 1.5.3 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.