{"id":"GHSA-6g2f-w7g3-77vf","revision":null,"records":[{"revision":"a92bacee2de94fa4bf0aeb23a4721dd4","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2026-49353","aliases":[],"title":"9Router: Local-Only Access Gate Bypass in 9router via Host Header SpoofING","description":"9Router is an AI router & token saver. In 0.4.45 and earlier, 9Router's src/dashboardGuard.js local-only access gate used Host and Origin headers in isLocalRequest() to protect /api/mcp/*, /api/tunnel/*, and /api/cli-tools/*, allowing header spoofing in reverse proxy or tunnel deployments to reach MCP child process stdin paths.","state":0,"publishedAt":"2026-07-15T20:49:15.693+00:00","modifiedAt":"2026-07-16T15:12:31.23+00:00","affected":[{"ecosystem":"Vendor product","name":"9router","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"decolua\",\n                    \"product\": \"9router\",\n                    \"versions\": [\n                        {\n                            \"version\": \"<= 0.4.45\",\n                            \"status\": \"affected\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:H/A:N","score":7.5,"severity":"HIGH"}],"references":["https://github.com/decolua/9router/security/advisories/GHSA-6g2f-w7g3-77vf","https://github.com/decolua/9router/commit/5e1c1261368e06dced1cbc650684561b2c8844db","https://github.com/decolua/9router/commit/bb86808582067e4fc6f004508a919efb9970d1d5","https://github.com/decolua/9router/releases/tag/v0.4.46"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-49353","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-49353","identifiers":["CVE-2026-49353"]},"retained":false,"historicalAffected":[]},{"revision":"3df9af6497b84abdbfda527eedd3bb91","observedAt":"2026-10-25T12:17:32.273+00:00","statement":{"source":"nvd","id":"CVE-2026-49353","aliases":[],"title":"9Router is an AI router & token saver. In 0.4.45 and earlier, 9Router's src/dashboardGuard.js local-only access gate used Host and Origin headers in isLocalRequest() to protect /api/mcp/*, /api/tunnel/*, and /api/cli-tools/*, allowing heade…","description":"9Router is an AI router & token saver. In 0.4.45 and earlier, 9Router's src/dashboardGuard.js local-only access gate used Host and Origin headers in isLocalRequest() to protect /api/mcp/*, /api/tunnel/*, and /api/cli-tools/*, allowing header spoofing in reverse proxy or tunnel deployments to reach MCP child process stdin paths.","state":0,"publishedAt":"2026-07-15T21:16:53.87+00:00","modifiedAt":"2026-10-24T21:10:00.13+00:00","affected":[],"metrics":[{"system":"CVSS 3.1 · security-advisories@github.com · Secondary","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:H/A:N","score":7.5,"severity":"HIGH"}],"references":["https://github.com/decolua/9router/commit/5e1c1261368e06dced1cbc650684561b2c8844db","https://github.com/decolua/9router/commit/bb86808582067e4fc6f004508a919efb9970d1d5","https://github.com/decolua/9router/releases/tag/v0.4.46","https://github.com/decolua/9router/security/advisories/GHSA-6g2f-w7g3-77vf"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2026-49353","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Deferred","weaknesses":["CWE-290"],"productCriteria":[],"sourceDates":{"published":"2026-07-15T21:16:53.870","lastModified":"2026-10-24T21:10:00.130"},"relatedAdvisories":[],"note":"NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON."},"key":"nvd:CVE-2026-49353","identifiers":["CVE-2026-49353"]},"retained":false,"historicalAffected":[]},{"revision":"ad5997bef53a4053a49a0e050d47bb14","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"GHSA-6g2f-w7g3-77vf","aliases":["CVE-2026-49353"],"title":"9router has an Incomplete Fix: Local-Only Access Gate Bypass in 9router via Host Header SpoofING","description":"## Summary\n\nThe fix for CVE-2026-46339 (unauthenticated RCE via unprotected MCP plugin routes) introduced a local-only access gate in `src/dashboardGuard.js` that restricts spawn-capable routes (`/api/mcp/*`, `/api/tunnel/*`, `/api/cli-tools/*`) to loopback requests. The gate determines \"local\" by inspecting the `Host` and `Origin` HTTP headers rather than the TCP source address. When 9router is deployed behind a reverse proxy, tunnel (Cloudflare Tunnel, Tailscale — both natively supported), or is subject to DNS rebinding, these headers are attacker-controlled, allowing the local-only gate to be bypassed.\n\nA second factor (CLI token or JWT cookie) is required by `canAccessLocalOnlyRoute()`, but the CLI token is a deterministic HMAC of the machine ID (`getConsistentMachineId`), which is stable and predictable on cloud VMs. If the attacker can obtain or guess the machine ID (e.g., via another information disclosure, or on shared-tenant infrastructure), the full chain to MCP child process stdin injection is reachable.\n\nThis is a variant / incomplete fix of CVE-2026-46339 — the same attack surface (remote → MCP child process stdin) remains reachable under specific but realistic deployment configurations.\n\n## Root Cause\n\n`isLocalRequest()` at `src/dashboardGuard.js:93-101`:\n\n```javascript\nfunction isLocalRequest(request) {\n  if (!isLoopbackHostname(request.headers.get(\"host\"))) return false;\n  const origin = request.headers.get(\"origin\");\n  if (origin) {\n    try {\n      if (!isLoopbackHostname(new URL(origin).hostname)) return false;\n    } catch { return false; }\n  }\n  return true;\n}\n```\n\nThis function trusts `Host` and `Origin` headers as proof of local origin. Both are attacker-controlled in any proxied deployment. The `LOOPBACK_HOSTS` set (`localhost`, `127.0.0.1`, `::1`) is checked against these headers, not against the actual connection source IP.\n\n## Attack Scenario\n\n### Scenario 1: Cloudflare Tunnel / Tailscale Funnel\n\n9router natively supports Cloudflare Tunnel and Tailscale (see `LOCAL_ONLY_PATHS` entries for `/api/tunnel/*`). When exposed via tunnel:\n\n1. Attacker sends request to `https://<tunnel-domain>/api/mcp/<plugin>/sse`\n2. Sets `Host: localhost:3000` and `Origin: http://localhost:3000`\n3. `isLocalRequest()` returns `true`\n4. `canAccessLocalOnlyRoute()` then requires CLI token or (local + JWT)\n5. CLI token is `getConsistentMachineId(\"9r-cli-auth\")` — a deterministic HMAC of the machine's hardware/OS identifiers\n\n### Scenario 2: DNS Rebinding\n\n1. Attacker controls `evil.com` DNS, initially resolving to attacker IP\n2. Victim's browser navigates to `evil.com` (or via iframe/redirect)\n3. DNS rebinding switches `evil.com` → `127.0.0.1`\n4. Subsequent fetch to `evil.com:3000/api/mcp/<plugin>/message` reaches 9router\n5. `Host` header is `evil.com:3000` — this is **blocked** by the current check (not in LOOPBACK_HOSTS)\n6. However, if the attacker uses `localhost:3000` as the request host via CORS or service worker tricks, and the browser sends `Host: localhost:3000`, the gate opens\n\n### Exploitation (when CLI token is obtained)\n\nOnce past the gate, the attacker can:\n\n1. `GET /api/mcp/<plugin>/sse` — establish SSE session, get `sessionId`\n2. `POST /api/mcp/<plugin>/message` — send arbitrary JSON-RPC to the child process stdin\n3. The child process is one of: `npx`, `node`, `python`, `python3`, `uvx`, `bunx`, `bun`\n4. Depending on the MCP plugin implementation, this can achieve arbitrary code execution on the host\n\n## Steps to Reproduce\n\n1. Deploy 9router behind a reverse proxy or tunnel\n2. From a remote host, send:\n\n```http\nGET /api/mcp/browser/sse HTTP/1.1\nHost: localhost:3000\nOrigin: http://localhost:3000\nx-9r-cli-token: <machine-id-derived-token>\n```\n\n3. Observe: SSE connection established, `endpoint` event received with message URL\n4. POST arbitrary JSON-RPC to the message endpoint\n\n## Impact\n\nAn attacker who can reach a proxied/tunneled 9router instance and obtain the deterministic CLI token can bypass the local-only restriction and interact with MCP child processes (node, python, npx, etc.) via stdin. This achieves the same impact as CVE-2026-46339: remote code execution on the host.\n\nThe severity is reduced from CVE-2026-46339's CVSS 10.0 because:\n- Requires proxied/tunneled deployment (not default localhost-only)\n- Requires obtaining the CLI token (deterministic but not trivially guessable without another primitive)\n\n## Remediation\n\n1. **Check actual source IP, not headers.** Use `request.ip`, `request.socket.remoteAddress`, or a trusted `X-Forwarded-For` header with known proxy configuration instead of `Host`/`Origin` for the local-only gate.\n\n2. **Make CLI token non-deterministic.** Generate a random token on first run and persist it, rather than deriving from machine ID. Machine IDs are often predictable or discoverable on cloud infrastructure.\n\n3. **Bind MCP routes to loopback at the network layer.** If MCP is local-only by design, the server should bind those routes to `127.0.0.1` only, not rely on middleware header checks.\n\n\nCredit: @snailsploit","state":0,"publishedAt":"2026-07-02T21:13:19+00:00","modifiedAt":"2026-07-02T21:26:28.689915+00:00","affected":[{"ecosystem":"npm","name":"9router","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"last_affected","version":"0.4.55"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:H/A:N","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"HIGH"}],"references":["https://github.com/decolua/9router/security/advisories/GHSA-6g2f-w7g3-77vf","https://github.com/decolua/9router/commit/5e1c1261368e06dced1cbc650684561b2c8844db","https://github.com/decolua/9router/commit/bb86808582067e4fc6f004508a919efb9970d1d5","https://github.com/decolua/9router"],"sourceUrl":"https://github.com/advisories/GHSA-6g2f-w7g3-77vf","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-6g2f-w7g3-77vf","identifiers":["GHSA-6g2f-w7g3-77vf","CVE-2026-49353"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-10-27T08:06:27.4054375+00:00","complete":true,"records":1758,"lastAttemptAt":"2026-10-27T08:06:27.4054375+00:00","lastSuccessAt":"2026-10-27T08:06:27.6113185+00:00","error":null,"lastVerifiedAt":"2026-10-27T08:06:27.6113197+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-187d2b72c94ceb8c4417f1032ec3109a3a3a7b730abadb561d8cdd2a96e04d27-18c597c2614da2501092bf7bec3d61f93c4af7d3dcf9d76137dd5a6a7b648ce8","complete":true,"records":414875,"lastAttemptAt":"2026-10-27T08:06:26.8191201+00:00","lastSuccessAt":"2026-10-27T08:06:26.7816085+00:00","error":null,"lastVerifiedAt":"2026-10-27T08:06:26.8191201+00:00","snapshotPublishedAt":"2026-10-27T07:29:05+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-43321610382942b8ad8c85917eab1546","complete":false,"records":4735,"lastAttemptAt":"2026-10-27T08:06:51.0390723+00:00","lastSuccessAt":"2026-10-24T23:18:49.862+00:00","error":"InvalidDataException","lastVerifiedAt":"2026-10-24T23:18:49.862+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":0,"expectedIdentifiers":13477},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-10-27T08:06:27.4054375+00:00","complete":true,"records":1093,"lastAttemptAt":"2026-10-27T08:06:27.4054375+00:00","lastSuccessAt":"2026-10-27T08:06:27.7555276+00:00","error":null,"lastVerifiedAt":"2026-10-27T08:06:27.7555289+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-d8daf1b153174f24ae7b01adb4adcbf4","complete":true,"records":13416,"lastAttemptAt":"2026-10-27T08:06:48.9076777+00:00","lastSuccessAt":"2026-10-27T08:06:48.903+00:00","error":null,"lastVerifiedAt":"2026-10-27T08:06:48.903+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13477,"expectedIdentifiers":13477},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-c3121b113ecd88f1c92ccfa0ec9757ddc8386e4c12afd2597450b815744f800a","complete":true,"records":9779,"lastAttemptAt":"2026-10-27T08:06:27.2041205+00:00","lastSuccessAt":"2026-10-26T15:37:14.3083004+00:00","error":null,"lastVerifiedAt":"2026-10-27T08:06:27.2041205+00:00","snapshotPublishedAt":"2026-10-26T14:48:41+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-bad5d31e7f6a5e3d338e11d8789069b63620a403f927730769688b42f768e4f6","complete":true,"records":1965,"lastAttemptAt":"2026-10-27T08:06:27.0036886+00:00","lastSuccessAt":"2026-10-26T16:35:43.1460623+00:00","error":null,"lastVerifiedAt":"2026-10-27T08:06:27.0036886+00:00","snapshotPublishedAt":"2026-10-26T16:18:29+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-a393d8fe0ae8408f3e4cab413b76047090c8e4a3c0a186c79edf33c9a3d3af95","complete":true,"records":2995,"lastAttemptAt":"2026-10-27T08:06:27.3077296+00:00","lastSuccessAt":"2026-10-26T14:35:47.9640893+00:00","error":null,"lastVerifiedAt":"2026-10-27T08:06:27.3077296+00:00","snapshotPublishedAt":"2026-10-26T14:18:55+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-2c2579bb03487537529e2b647fd2d9950cfc0fec1a9832dba33e322b8dcbe369","complete":true,"records":230812,"lastAttemptAt":"2026-10-27T08:06:27.1068006+00:00","lastSuccessAt":"2026-10-26T21:37:26.5810298+00:00","error":null,"lastVerifiedAt":"2026-10-27T08:06:27.1068006+00:00","snapshotPublishedAt":"2026-10-26T21:33:12+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null}]}