CVE-2026-56679: 9router Mass Assignment Vulnerability

HIGH
Advisory Identifier: GHSA-vmjq-hvgq-2wv4
CWE-915
Published
Advisory Summary

CVE-2026-56679 is a HIGH mass assignment vulnerability (CWE-915: Improperly Controlled Modification of Dynamically-Determined Object Attributes) affecting 9router libraries in the npm ecosystem. The issue involves mass assignment in patch /api/settings allows authenticated authorization downgrade. Remediation is available by upgrading affected packages to version 0.5.4.

CVE-2026-56679 at a Glance

CVE Identifier CVE-2026-56679
GHSA Identifier GHSA-vmjq-hvgq-2wv4
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-915: Improperly Controlled Modification of Dynamically-Determined Object Attributes
Affected Product 9router
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2026-56679

To remediate this vulnerability, upgrade all affected 9router dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

9router fixed: 0.5.4
npm install 9router@0.5.4
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls 9router

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-56679, inspect your project dependencies using npm:

npm ls 9router

Analyze the terminal output to locate any version of 9router in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.5.4), your application is affected.

Note: The npm ls 9router 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-915: Improperly Controlled Modification of Dynamically-Determined Object Attributes, where the product receives input from an upstream component that specifies multiple attributes, properties, or fields that are to be initialized or updated in an object, but it does not properly control which attributes can be modified. In 9router, 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

### Summary The `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. ### Details Root cause is unfiltered mass assignment (CWE-915): - `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. - `src/lib/db/repos/settingsRepo.js` — `updateSettings` does `next = { ...current, ...updates }`, so any key in the body overwrites stored settings, including `requireLogin`, `tunnelDashboardAccess`, `authMode`. - `src/dashboardGuard.js` — `isAuthenticated` returns `true` whenever `settings.requireLogin === false`, bypassing auth on all protected routes. This 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. ### PoC Instance on `localhost:20128`, default password `123456`. 1. Authenticate, capture session: `POST /api/auth/login` body `{"password":"123456"}` → `200 {"success":true}` 2. Mass-assign with the authenticated session: `PATCH /api/settings` body `{"requireLogin":false}` → `200`, response confirms `"requireLogin":false` 3. Verify bypass with NO session/credentials: `GET /api/keys` → `200`, returns full API key list unauthenticated 4. Cleanup (authenticated): `PATCH /api/settings` body `{"requireLogin":true}` → `GET /api/keys` returns `401` again ### Impact Post-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`). ### Suggested fix Whitelist 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.

CVE-2026-56679 Affected 9router Versions

1 component(s)
Fixed Versions:
0.5.4
Product / Package Ecosystem Affected Versions Fixed Version
9router
npm
< 0.5.4
0.5.4

References

Frequently Asked Questions

What is CVE-2026-56679?
CVE-2026-56679 is a security vulnerability in 9router involving Mass assignment in PATCH /api/settings allows authenticated authorization downgrade under CWE-915: Improperly Controlled Modification of Dynamically-Determined Object Attributes.
Which 9router versions are affected?
Affected versions include releases prior to 0.5.4 across affected packages: 9router.
What version fixes CVE-2026-56679?
Upgrading to 0.5.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is 9router affected?
Yes, 9router is affected in releases prior to 0.5.4. Upgrade your dependency to 0.5.4 or later.
What CWE is associated with CVE-2026-56679?
CVE-2026-56679 is classified under CWE-915: Improperly Controlled Modification of Dynamically-Determined Object Attributes (The product receives input from an upstream component that specifies multiple attributes, properties, or fields that are to be initialized or updated in an object, but it does not properly control which attributes can be modified.).
How can I check npm dependencies for CVE-2026-56679?
Run the dependency tree command: 'npm ls 9router'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-vmjq-hvgq-2wv4",
  "modified" : "2026-09-23T18:12:33Z",
  "published" : "2026-09-23T18:12:33Z",
  "aliases" : [ "CVE-2026-56679" ],
  "summary" : "9router: Mass assignment in PATCH /api/settings allows authenticated authorization downgrade",
  "details" : "### 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.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "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"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "9router"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.5.4"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.5.2"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/decolua/9router/security/advisories/GHSA-vmjq-hvgq-2wv4"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-56679"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/decolua/9router"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-915" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-09-23T18:12:33Z",
    "nvd_published_at" : "2026-07-15T21:16:55Z"
  }
}