{"id":"CVE-2026-56679","aliases":["CVE-2026-56679","GHSA-vmjq-hvgq-2wv4"],"related":[],"kind":"vulnerability","state":"published","title":"9Router: Mass assignment in PATCH /api/settings allows authenticated authorization downgrade","summary":"9Router is an AI router & token saver. Prior to 0.5.4, the PATCH /api/settings endpoint writes the entire request body to persistent settings without a field whitelist, allowing an authenticated user to set security-critical fields such as requireLogin and disable authentication for the whole application, exposing protected routes such as /api/keys and /api/providers to unauthenticated access. This issue is reported as fixed in version 0.5.4.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"9Router is an AI router & token saver. Prior to 0.5.4, the PATCH /api/settings endpoint writes the entire request body to persistent settings without a field whitelist, allowing an authenticated user to set security-critical fields such as requireLogin and disable authentication for the whole application, exposing protected routes such as /api/keys and /api/providers to unauthenticated access. This issue is reported as fixed in version 0.5.4.","source":"cvelist"},{"lang":"en","text":"### Summary\nThe `PATCH /api/settings` endpoint writes the entire request body to persistent settings without a field whitelist. An authenticated user can set security-critical fields that are not meant to be modifiable here — notably `requireLogin`. Setting `requireLogin: false` disables authentication for the whole application, exposing all protected routes (e.g. `/api/keys`, `/api/providers`) to unauthenticated access.\n\n### Details\nRoot cause is unfiltered mass assignment (CWE-915):\n\n- `src/app/api/settings/route.js` (PATCH handler) parses the body and passes it to `updateSettings(body)`, with special handling only for `newPassword` and `oidcClientSecret`. All other fields pass through.\n- `src/lib/db/repos/settingsRepo.js` — `updateSettings` does `next = { ...current, ...updates }`, so any key in the body overwrites stored settings, including `requireLogin`, `tunnelDashboardAccess`, `authMode`.\n- `src/dashboardGuard.js` — `isAuthenticated` returns `true` whenever `settings.requireLogin === false`, bypassing auth on all protected routes.\n\nThis is distinct from CVE-2026-5842 (CWE-285, pre-auth bypass on `/api`, patched in 0.3.75). This finding requires a valid authenticated session and abuses input handling, not missing authentication.\n\n### PoC\nInstance on `localhost:20128`, default password `123456`.\n\n1. Authenticate, capture session:\n   `POST /api/auth/login` body `{\"password\":\"123456\"}` → `200 {\"success\":true}`\n2. Mass-assign with the authenticated session:\n   `PATCH /api/settings` body `{\"requireLogin\":false}` → `200`, response confirms `\"requireLogin\":false`\n3. Verify bypass with NO session/credentials:\n   `GET /api/keys` → `200`, returns full API key list unauthenticated\n4. Cleanup (authenticated): `PATCH /api/settings` body `{\"requireLogin\":true}` → `GET /api/keys` returns `401` again\n\n### Impact\nPost-authentication mass assignment. Any authenticated user (including one using the default password) can disable authentication globally, then read all stored API keys and provider connection data without credentials, and toggle tunnel/dashboard exposure. Escalates to remote full compromise when chained with the default password `123456` on an instance exposed via tunnel (`tunnelDashboardAccess` defaults to `true`).\n\n### Suggested fix\nWhitelist user-configurable fields in the PATCH handler; move security-critical fields (`requireLogin`, `tunnelDashboardAccess`, `authMode`) to a dedicated endpoint requiring re-authentication (current-password re-entry), mirroring the existing DB export/import re-auth flow.","format":"markdown","source":"ghsa"},{"lang":"es","text":"9Router es un router de IA y ahorrador de tokens. Antes de la versión 0.5.4, el endpoint PATCH /api/settings escribe el cuerpo completo de la solicitud en la configuración persistente sin una lista blanca de campos, permitiendo a un usuario autenticado establecer campos críticos para la seguridad como ’requireLogin’ y deshabilitar la autenticación para toda la aplicación, exponiendo rutas protegidas como /api/keys y /api/providers a acceso no autenticado. Se informa que este problema está solucionado en la versión 0.5.4.","source":"nvd"}],"published":"2026-07-15T20:50:30.458Z","modified":"2026-10-24T21:10:00.130Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N","score":8.7,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N","score":8.7,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N","rating":"HIGH"}],"cwes":["CWE-915"],"affected":[{"ranges":[{"version":"< 0.5.4","status":"affected"}],"vendor":"decolua","product":"9router","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.5.4"}],"ecosystem":"npm","package":"9router","purl":"pkg:npm/9router","source":"ghsa"}],"references":[{"url":"https://github.com/decolua/9router/security/advisories/GHSA-vmjq-hvgq-2wv4","tags":["exploit","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-56679","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/decolua/9router","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"total","date":"2026-07-16T13:00:02.844Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-56679","url":"https://www.cve.org/CVERecord?id=CVE-2026-56679","licence":"CVE Terms of Use","modified":"2026-07-16T13:00:42.944Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-vmjq-hvgq-2wv4","url":"https://github.com/advisories/GHSA-vmjq-hvgq-2wv4","licence":"CC-BY-4.0","modified":"2026-09-23T18:27:57.574Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-56679","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-56679","licence":"Public domain","modified":"2026-10-24T21:10:00.130Z"}],"updatedAt":"2026-11-25T22:59:28.349Z","epss":{"score":0.00401,"percentile":0.36486,"date":"2026-12-01T12:00:22.000Z"}}