A Denial of Service (DoS) vulnerability allows an unauthenticated attacker to crash the SignalK Server by flooding the access request endpoint (/signalk/v1/access/requests). This causes a "JavaScript heap out of memory" error due to unbounded in-memory storage of request objects.
The vulnerability is caused by a lack of rate limiting and improper memory management for incoming access requests.
Vulnerable Code Analysis:
src/requestResponse.js, requests are stored in a simple JavaScript object:
const requests = {}
createRequest function adds new requests to this object without checking the current size or count of existing requests.pruneRequests function, which removes old requests, runs only once every 15 minutes (pruneIntervalRate)./signalk/v1/access/requests accepts POST requests from any client without any rate limiting or authentication (by design, as it's for initial access requests).Exploit Scenario:
/signalk/v1/access/requests.requests object in the Node.js heap.FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory.The following Python script reproduces the crash by flooding the server with requests containing 100KB payloads.
import urllib.request
import json
import threading
import time
# Target Configuration
TARGET_URL = "http://localhost:3000/signalk/v1/access/requests"
PAYLOAD_SIZE_MB = 0.1 # 100 KB per request
NUM_REQUESTS = 20000 # Sufficient to exhaust heap
CONCURRENCY = 50
# Generate a large...
2.19.0Exploitability
AV:NAC:LPR:NUI:NScope
S:UImpact
C:NI:NA:H7.5/CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H