Authentication Bypass in 9router via Mass Assignment
9router versions 0.5.2 and earlier are vulnerable to mass assignment in the PATCH /api/settings endpoint, allowing an authenticated user to disable authentication globally and access protected API routes.
CVE search metadata
CVE search record: CVE-2026-56679. EPSS: 0.52%. KEV: no. Product: 9router (<= 0.5.2), 9router (<= 0.4.80). Brief: Authentication Bypass in 9router via Mass Assignment. Brief link: https://feed.craftedsignal.io/briefs/2026-09-9router-mass-assignment/
What's new
- 1. added coverage for 9router (<= 0.4.80) Sep 23, 19:59 via ghsa
9router versions 0.5.2 and earlier contain a mass assignment vulnerability (CVE-2026-56679) within the PATCH /api/settings endpoint. The application fails to whitelist fields provided in the request body, allowing arbitrary fields to be written to the database. An authenticated attacker can specifically target the requireLogin field, setting it to false. Because the dashboardGuard.js middleware uses this setting to determine authentication status, disabling it effectively removes the authentication requirement for the entire application. This exposes sensitive endpoints like /api/keys and /api/providers to unauthenticated access, potentially leading to total system compromise when combined with known default credentials or previously obtained session tokens.
Attack Chain
- Attacker authenticates to the target 9router instance using a valid session or default credentials (e.g., password '123456').
- Attacker crafts an HTTP PATCH request to the
/api/settingsendpoint. - Attacker includes
{"requireLogin": false}in the JSON request body to trigger the mass assignment vulnerability. - The
PATCHhandler insrc/app/api/settings/route.jsaccepts the input without validation and passes it to theupdateSettingsrepository function. - The
updateSettingsfunction insrc/lib/db/repos/settingsRepo.jsperforms a partial update, overwriting the storedrequireLoginconfiguration in the database. - The
dashboardGuard.jsmiddleware observes the updatedrequireLoginsetting and returnstrueforisAuthenticatedchecks for all subsequent requests. - Attacker performs unauthorized GET requests to sensitive endpoints such as
/api/keyswithout providing credentials to exfiltrate API keys and configuration.
Impact
Successful exploitation allows an authenticated user to achieve global authentication bypass. This results in the exposure of stored API keys, provider connection details, and dashboard administrative settings. The impact is elevated if the instance is exposed via a tunnel (tunnelDashboardAccess enabled), providing a remote vector for full system compromise.
Recommendation
- Upgrade 9router to a version beyond 0.5.2 immediately.
- Audit
PATCH /api/settingslogs for requests containing unexpected keys, specifically focusing onrequireLogin,tunnelDashboardAccess, andauthMode. - Enforce re-authentication for all requests modifying security-critical settings by requiring current password validation at the application level.
- Deploy network-level access controls to restrict access to the
/apipath until the patch is applied.
Immediate actions
Upgrade all 9router instances to a version beyond 0.5.2
Threat Hunt
Search logs for PATCH requests to /api/settings followed by unauthorized access to /api/keys
Data: Web application access logs
Mitigations
Block access to /api/settings from non-administrative IP addresses
CVE-2026-56679
Detection coverage 1
Detect Suspicious PATCH /api/settings Configuration Changes
highDetects unauthorized attempts to modify security-critical settings in 9router by identifying PATCH requests to /api/settings that include the requireLogin flag
Detection queries are available on the platform. Get full rules →