CVE-2026-56677: 9Router Authenticated Server-Side Request Forgery (SSRF) Vulnerability

HIGH
Advisory Identifier: GHSA-8g4w-4ffg-8vgx
CVSS 8.6
CWE-306 CWE-918
Published
Advisory Summary

CVE-2026-56677 is a HIGH (CVSS 8.6) authenticated server-side request forgery (ssrf) vulnerability (CWE-306: Missing Authentication for Critical Function) affecting 9Router libraries in the npm ecosystem. The issue involves authenticated server-side request forgery (ssrf) via oidc provider test endpoint. Remediation is available in the latest vendor maintenance releases.

CVE-2026-56677 at a Glance

CVE Identifier CVE-2026-56677
GHSA Identifier GHSA-8g4w-4ffg-8vgx
Severity HIGH
CVSS v3.1 Base Score 8.6
CWE Classification CWE-306: Missing Authentication for Critical Function
Affected Product 9Router
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 8.6

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:L/I:H/A:L).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity High (I:H)
Availability Low (A:L)

How to Fix CVE-2026-56677

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: Latest secure release
npm install 9router@Latest secure release
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-56677, 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 the patched release), 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-306: Missing Authentication for Critical Function, where the product does not perform any authentication for functionality that requires a provable user identity or consumes a significant amount of resources. 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 A Server-Side Request Forgery (SSRF) vulnerability exists in the 9Router dashboard via the `/api/auth/oidc/test` endpoint. The application accepts a user-controlled URL string through the `issuerUrl` parameter and performs an outbound HTTP request without validating if the destination IP belongs to a restricted internal network range. Notably, this endpoint can be accessed without active session authentication (Unauthenticated), allowing any remote actor with network visibility to the dashboard API endpoints to trigger outbound infrastructure connections. Depending on the state and response of the internal port targeted, this flaw exhibits two distinct behaviors: 1. **Port Scanning / Blind SSRF (Non-OIDC structures):** Probing internal ports that are closed or running non-HTTP/non-OIDC services (e.g., SSH, Databases) forces predictable application behavior changes (e.g., structural timeout or clear JSON parsing error messages like "Unexpected token..."), allowing internal network reconnaissance. 2. **Full Data Feed Manipulation (OIDC matching structures):** If the targeted internal service responds with a valid OpenID configuration document structure, the backend successfully processes, parses, and reflects the internal properties back to the client, confirming partial data control. --- ### Vulnerable Code Details - **Classification:** VE-Class 4 — OIDC SSRF via issuerUrl (Unauthenticated) - **File Path:** `src/app/api/auth/oidc/test/route.js` - **Vulnerable Logic:** The endpoint accepts the parameter directly from the client request and passes it directly into the network client routine without prior sanitization or middleware authentication wrapper checks. ```javascript // Vulnerable implementation wrapper inside the route handler const discovery = await fetchOidcDiscovery(issuerUrl); // Behind the scenes, this executes a direct dynamic outbound request: // -> fetch(`${issuerUrl}/.well-known/openid-configuration`) ``` An unauthenticated user can point this at any internal URL to probe internal services that respond with JSON. The discovery JSON fields (`token_endpoint`, `jwks_uri`) are then processed by the internal application logic for further operations, enabling a multi-step SSRF chain. --- ### Affected Endpoints - **Endpoint:** `/api/auth/oidc/test` - **Method:** `POST` - **Parameter:** `issuerUrl` - **Impacted Feature:** OIDC Authentication Configuration Test --- ### Impact An unauthenticated attacker can abuse this behavior to use the 9Router instance as a proxy to: - Conduct internal network topology discovery and port scanning against the hosting infrastructure (`127.0.0.1`, `10.0.0.0/8`, `192.168.0.0/16`). - Expose internal application error states or feed malicious configuration structures back into the dashboard component logic without needing prior valid session tokens. --- ### Proof of Concept & Reproducing Steps #### Step 1: Set up the Verification Environment Utilize a local mock listener on an internal port (e.g., Port 80). Run the following PowerShell script with Administrative privileges to launch the mock listener: ```powershell $port = 80 $listener = New-Object System.Net.HttpListener $listener.Prefixes.Add("http://127.0.0.1:$port/") try { $listener.Start() Write-Host "=======================================================" -ForegroundColor Cyan Write-Host " MOCK OIDC SERVER RUNNING ON PORT 80" -ForegroundColor Green Write-Host "=======================================================" -ForegroundColor Cyan while ($listener.IsListening) { $context = $listener.GetContext() $request = $context.Request Write-Host "[+] SSRF Request received for URL: $($request.Url)" -ForegroundColor Yellow $jsonPayload = '{"issuer":"http://127.0.0.1","authorization_endpoint":"http://127.0.0.1/oauth/auth","token_endpoint":"http://127.0.0.1/oauth/token","userinfo_endpoint":"EVIDENCE_SSRF_CONFIRMED_SUCCESSFULLY","jwks_uri":"http://127.0.0.1/oauth/keys"}' $response = $context.Response $response.StatusCode = 200 $response.ContentType = "application/json" $buffer = [System.Text.Encoding]::UTF8.GetBytes($jsonPayload) $response.ContentLength64 = $buffer.Length $response.OutputStream.Write($buffer, 0, $buffer.Length) $response.Close() Write-Host "[*] JSON payload sent back to 9router" -ForegroundColor Green } } catch { Write-Host "Error starting server on port 80" -ForegroundColor Red } finally { if ($listener.IsListening) { $listener.Stop() } } ``` #### Step 2: Triggering the Vulnerability via Burp Suite Send the following raw HTTP request to the 9Router instance (Notice no Cookie header is required): ```http POST /api/auth/oidc/test HTTP/1.1 Host: localhost:3000 Content-Type: application/json Connection: keep-alive Content-Length: 54 { "issuerUrl": "http://127.0.0.1:80", "clientId": "probe_only" } ``` #### Step 3: Objective Analysis of Results **Scenario A: Targeting an Unmatched/Plain Text Port** (e.g., Port returning raw strings like `"check vul"`) The server connects to the port, receives a non-JSON response, and errors out during parsing. The application response explicitly leaks the parsing failure: ```json {"error":"Unexpected token 'c', \"check vul\" is not valid JSON"} ``` > **Analysis:** This confirms the backend successfully completed an outbound TCP handshake and read the payload from the internal resource, verifying an Error-based/Blind SSRF context without any user credentials. --- **Scenario B: Targeting the Valid Mock Port** (Port 80 with the script active) The backend connects to the mock listener, successfully fetches the fake configuration data, maps the internal endpoints, and replies with an HTTP 200 OK: ```json { "ok": true, "discoveryOk": true, "issuerUrl": "http://127.0.0.1:80", "authorizationEndpoint": "http://127.0.0.1/oauth/auth", "tokenEndpoint": "http://127.0.0.1/oauth/token", "jwksUri": "http://127.0.0.1/oauth/keys" } ``` <img width="1513" height="651" alt="image" src="https://github.com/user-attachments/assets/6621f418-7a0d-4660-b301-ad37468d8d7a" /> > **Analysis:** This confirms a Full Data Feed SSRF. The internal properties parsed directly from the mock script are completely reflected back in the public client response body. --- ### Root Cause Analysis The application logic handles network requests initiated by user input inside `/api/auth/oidc/test` without validating the host destination. Additionally, the route handler lacks proper authentication middleware checks to safeguard the functionality, allowing anonymous requests to safely reach internal server loops or private IP subnets. --- ### Suggested Fix 1. **Implement Access Control:** Protect the `/api/auth/oidc/test` handler with authentication middleware to enforce valid user sessions. 2. **Enforce Protocol Controls:** Validate that `issuerUrl` strictly uses the `https://` protocol scheme before performing the fetch operation. 3. **Implement Network Blocklists:** Resolve the hostname within `issuerUrl` on the server-side before initiating the connection. Validate the resolved IP address and explicitly drop requests pointing to loopback addresses (`127.0.0.0/8`, `::1`) or internal private addresses (`10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`).

CVE-2026-56677 Affected 9Router Versions

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

References

Frequently Asked Questions

What is CVE-2026-56677?
CVE-2026-56677 is a security vulnerability in 9Router involving Authenticated Server-Side Request Forgery (SSRF) via OIDC Provider Test Endpoint under CWE-306: Missing Authentication for Critical Function.
Which 9Router versions are affected?
Affected versions include releases prior to current release patches across affected packages: 9router.
What version fixes CVE-2026-56677?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is 9router affected?
Yes, 9router is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2026-56677?
CVE-2026-56677 has a CVSS v3.1 base score of 8.6 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:L.
What CWE is associated with CVE-2026-56677?
CVE-2026-56677 is classified under CWE-306: Missing Authentication for Critical Function (The product does not perform any authentication for functionality that requires a provable user identity or consumes a significant amount of resources.).
How can I check npm dependencies for CVE-2026-56677?
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-8g4w-4ffg-8vgx",
  "modified" : "2026-08-17T21:58:43Z",
  "published" : "2026-08-17T21:58:43Z",
  "aliases" : [ "CVE-2026-56677" ],
  "summary" : "9Router: Authenticated Server-Side Request Forgery (SSRF) via OIDC Provider Test Endpoint",
  "details" : "### Summary\n\nA Server-Side Request Forgery (SSRF) vulnerability exists in the 9Router dashboard via the `/api/auth/oidc/test` endpoint. The application accepts a user-controlled URL string through the `issuerUrl` parameter and performs an outbound HTTP request without validating if the destination IP belongs to a restricted internal network range.\n\nNotably, this endpoint can be accessed without active session authentication (Unauthenticated), allowing any remote actor with network visibility to the dashboard API endpoints to trigger outbound infrastructure connections.\n\nDepending on the state and response of the internal port targeted, this flaw exhibits two distinct behaviors:\n\n1. **Port Scanning / Blind SSRF (Non-OIDC structures):** Probing internal ports that are closed or running non-HTTP/non-OIDC services (e.g., SSH, Databases) forces predictable application behavior changes (e.g., structural timeout or clear JSON parsing error messages like \"Unexpected token...\"), allowing internal network reconnaissance.\n2. **Full Data Feed Manipulation (OIDC matching structures):** If the targeted internal service responds with a valid OpenID configuration document structure, the backend successfully processes, parses, and reflects the internal properties back to the client, confirming partial data control.\n\n---\n\n### Vulnerable Code Details\n\n- **Classification:** VE-Class 4 — OIDC SSRF via issuerUrl (Unauthenticated)\n- **File Path:** `src/app/api/auth/oidc/test/route.js`\n- **Vulnerable Logic:** The endpoint accepts the parameter directly from the client request and passes it directly into the network client routine without prior sanitization or middleware authentication wrapper checks.\n\n```javascript\n// Vulnerable implementation wrapper inside the route handler\nconst discovery = await fetchOidcDiscovery(issuerUrl);\n// Behind the scenes, this executes a direct dynamic outbound request:\n// -> fetch(`${issuerUrl}/.well-known/openid-configuration`)\n```\n\nAn unauthenticated user can point this at any internal URL to probe internal services that respond with JSON. The discovery JSON fields (`token_endpoint`, `jwks_uri`) are then processed by the internal application logic for further operations, enabling a multi-step SSRF chain.\n\n---\n\n### Affected Endpoints\n\n- **Endpoint:** `/api/auth/oidc/test`\n- **Method:** `POST`\n- **Parameter:** `issuerUrl`\n- **Impacted Feature:** OIDC Authentication Configuration Test\n\n---\n\n### Impact\n\nAn unauthenticated attacker can abuse this behavior to use the 9Router instance as a proxy to:\n\n- Conduct internal network topology discovery and port scanning against the hosting infrastructure (`127.0.0.1`, `10.0.0.0/8`, `192.168.0.0/16`).\n- Expose internal application error states or feed malicious configuration structures back into the dashboard component logic without needing prior valid session tokens.\n\n---\n\n### Proof of Concept & Reproducing Steps\n\n#### Step 1: Set up the Verification Environment\n\nUtilize a local mock listener on an internal port (e.g., Port 80).\n\nRun the following PowerShell script with Administrative privileges to launch the mock listener:\n\n```powershell\n$port = 80\n$listener = New-Object System.Net.HttpListener\n$listener.Prefixes.Add(\"http://127.0.0.1:$port/\")\n\ntry {\n    $listener.Start()\n    Write-Host \"=======================================================\" -ForegroundColor Cyan\n    Write-Host \"  MOCK OIDC SERVER RUNNING ON PORT 80\" -ForegroundColor Green\n    Write-Host \"=======================================================\" -ForegroundColor Cyan\n\n    while ($listener.IsListening) {\n        $context = $listener.GetContext()\n        $request = $context.Request\n        Write-Host \"[+] SSRF Request received for URL: $($request.Url)\" -ForegroundColor Yellow\n        \n        $jsonPayload = '{\"issuer\":\"http://127.0.0.1\",\"authorization_endpoint\":\"http://127.0.0.1/oauth/auth\",\"token_endpoint\":\"http://127.0.0.1/oauth/token\",\"userinfo_endpoint\":\"EVIDENCE_SSRF_CONFIRMED_SUCCESSFULLY\",\"jwks_uri\":\"http://127.0.0.1/oauth/keys\"}'\n\n        $response = $context.Response\n        $response.StatusCode = 200\n        $response.ContentType = \"application/json\"\n        \n        $buffer = [System.Text.Encoding]::UTF8.GetBytes($jsonPayload)\n        $response.ContentLength64 = $buffer.Length\n        $response.OutputStream.Write($buffer, 0, $buffer.Length)\n        $response.Close()\n        Write-Host \"[*] JSON payload sent back to 9router\" -ForegroundColor Green\n    }\n} catch {\n    Write-Host \"Error starting server on port 80\" -ForegroundColor Red\n} finally {\n    if ($listener.IsListening) { $listener.Stop() }\n}\n```\n\n#### Step 2: Triggering the Vulnerability via Burp Suite\n\nSend the following raw HTTP request to the 9Router instance (Notice no Cookie header is required):\n\n```http\nPOST /api/auth/oidc/test HTTP/1.1\nHost: localhost:3000\nContent-Type: application/json\nConnection: keep-alive\nContent-Length: 54\n\n{\n  \"issuerUrl\": \"http://127.0.0.1:80\",\n  \"clientId\": \"probe_only\"\n}\n```\n\n#### Step 3: Objective Analysis of Results\n\n**Scenario A: Targeting an Unmatched/Plain Text Port** (e.g., Port returning raw strings like `\"check vul\"`)\n\nThe server connects to the port, receives a non-JSON response, and errors out during parsing. The application response explicitly leaks the parsing failure:\n\n```json\n{\"error\":\"Unexpected token 'c', \\\"check vul\\\" is not valid JSON\"}\n```\n\n> **Analysis:** This confirms the backend successfully completed an outbound TCP handshake and read the payload from the internal resource, verifying an Error-based/Blind SSRF context without any user credentials.\n\n---\n\n**Scenario B: Targeting the Valid Mock Port** (Port 80 with the script active)\n\nThe backend connects to the mock listener, successfully fetches the fake configuration data, maps the internal endpoints, and replies with an HTTP 200 OK:\n\n```json\n{\n  \"ok\": true,\n  \"discoveryOk\": true,\n  \"issuerUrl\": \"http://127.0.0.1:80\",\n  \"authorizationEndpoint\": \"http://127.0.0.1/oauth/auth\",\n  \"tokenEndpoint\": \"http://127.0.0.1/oauth/token\",\n  \"jwksUri\": \"http://127.0.0.1/oauth/keys\"\n}\n```\n<img width=\"1513\" height=\"651\" alt=\"image\" src=\"https://github.com/user-attachments/assets/6621f418-7a0d-4660-b301-ad37468d8d7a\" />\n\n> **Analysis:** This confirms a Full Data Feed SSRF. The internal properties parsed directly from the mock script are completely reflected back in the public client response body.\n\n---\n\n### Root Cause Analysis\n\nThe application logic handles network requests initiated by user input inside `/api/auth/oidc/test` without validating the host destination. Additionally, the route handler lacks proper authentication middleware checks to safeguard the functionality, allowing anonymous requests to safely reach internal server loops or private IP subnets.\n\n---\n\n### Suggested Fix\n\n1. **Implement Access Control:** Protect the `/api/auth/oidc/test` handler with authentication middleware to enforce valid user sessions.\n\n2. **Enforce Protocol Controls:** Validate that `issuerUrl` strictly uses the `https://` protocol scheme before performing the fetch operation.\n\n3. **Implement Network Blocklists:** Resolve the hostname within `issuerUrl` on the server-side before initiating the connection. Validate the resolved IP address and explicitly drop requests pointing to loopback addresses (`127.0.0.0/8`, `::1`) or internal private addresses (`10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`).",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "9router"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "0.5.4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/decolua/9router/security/advisories/GHSA-8g4w-4ffg-8vgx"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/decolua/9router"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-306", "CWE-918" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-08-17T21:58:43Z",
    "nvd_published_at" : null
  }
}