Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2026-56675

CVE-2026-56675: 9Router Auth Bypass Vulnerability

CVE-2026-56675 is an authentication bypass flaw in 9Router that allows remote attackers to access protected APIs without authentication. This article covers the technical details, affected versions, and mitigation steps.

Published:

CVE-2026-56675 Overview

CVE-2026-56675 is an authentication bypass vulnerability [CWE-287] in 9Router, an AI router and token-saving proxy. Versions prior to 0.5.2 treat all loopback requests as trusted local traffic. When 9Router runs behind a same-host reverse proxy that forwards public traffic to 127.0.0.1, the guard function in src/dashboardGuard.js misclassifies external requests as local. This allows a remote unauthenticated attacker to access /v1/* API endpoints without an API key. Fixed in version 0.5.2.

Critical Impact

Remote unauthenticated attackers can reach /v1/models and other /v1 proxy endpoints, potentially abusing configured upstream provider credentials depending on enabled providers.

Affected Products

  • 9Router versions prior to 0.5.2
  • Deployments placing 9Router behind a same-host reverse proxy forwarding to 127.0.0.1
  • Instances with configured upstream AI provider credentials exposed via /v1 proxy endpoints

Discovery Timeline

  • 2026-07-10 - CVE-2026-56675 published to NVD
  • 2026-07-10 - Last updated in NVD database

Technical Details for CVE-2026-56675

Vulnerability Analysis

9Router exposes a /v1 API surface intended for local use only. The dashboard guard determines whether a request is local by inspecting the TCP peer address. When the request originates from a loopback address, the guard bypasses API key enforcement. This trust model breaks when 9Router sits behind a reverse proxy on the same host. The proxy terminates the external connection and opens a new one to 127.0.0.1, so every forwarded request appears local. External attackers can therefore reach /v1/models and any enabled /v1 proxy endpoint without credentials.

Root Cause

The root cause is improper trust of the transport-layer peer address. isLocalRequest in src/dashboardGuard.js treated a loopback remoteAddress as sufficient proof of a local caller. The code did not consider proxy-forwarding indicators such as X-Forwarded-For or X-Real-IP. Loopback identity is an insufficient authentication signal in any deployment that terminates traffic through a same-host proxy.

Attack Vector

An unauthenticated remote attacker sends HTTP requests to the reverse proxy that fronts 9Router. The proxy relays the request to the loopback listener, which classifies the connection as local and skips API key validation. The attacker can enumerate models via /v1/models and issue requests to upstream provider proxy endpoints, consuming tokens or exfiltrating provider access under the operator's account.

javascript
// Patch: src/dashboardGuard.js
export function isLocalRequest(request) {
  // Stamped by custom-server.js when forwarding headers exist: request came through
  // a reverse proxy, so the loopback socket is the proxy hop, not the end-user.
  if (request.headers.get("x-9r-via-proxy")) return false;
  // Trusted peer IP from TCP socket (custom-server.js); unspoofable. Primary anchor for "local".
  const realIp = request.headers.get("x-9r-real-ip");
  if (realIp) {
    // ...
  }
}

Source: GitHub Commit da667836

Detection Methods for CVE-2026-56675

Indicators of Compromise

  • Unexpected requests to /v1/models, /v1/chat/completions, or other /v1/* endpoints originating from external clients via the reverse proxy
  • Access log entries where X-Forwarded-For is populated but the request succeeded without an API key
  • Anomalous token consumption or billing spikes on configured upstream AI providers

Detection Strategies

  • Compare reverse-proxy access logs with 9Router application logs to identify /v1/* calls that lack authentication metadata
  • Alert on any /v1/* response with status 200 where the source IP resolves to a public range
  • Baseline upstream provider API usage and flag deviations that correlate with 9Router traffic

Monitoring Recommendations

  • Enable request logging on the reverse proxy including X-Forwarded-For and upstream response codes
  • Instrument outbound calls to AI provider APIs with per-request attribution
  • Forward reverse-proxy and 9Router logs to a centralized analytics platform for correlation

How to Mitigate CVE-2026-56675

Immediate Actions Required

  • Upgrade 9Router to version 0.5.2 or later, which stamps x-9r-via-proxy when forwarding headers are present
  • Audit reverse-proxy configuration to confirm X-Forwarded-For and X-Real-IP headers are set for all forwarded traffic
  • Rotate any upstream AI provider API keys configured in 9Router if external /v1/* access is suspected

Patch Information

The fix in 9Router v0.5.2 modifies custom-server.js to detect proxy hops using X-Forwarded-For or X-Real-IP and stamps an internal x-9r-via-proxy header. src/dashboardGuard.js now returns false from isLocalRequest whenever that header is present, ensuring API key enforcement applies to proxied traffic. See the GitHub Security Advisory GHSA-x5c9-v98j-722r for additional details.

Workarounds

  • Bind 9Router to a Unix domain socket or a non-loopback interface reachable only by trusted local processes if upgrading is not immediately possible
  • Enforce API key checks at the reverse proxy layer for all /v1/* paths
  • Restrict the reverse proxy to admin networks until the upgrade is applied
bash
# Example nginx snippet enforcing API key at the proxy tier as a temporary control
location /v1/ {
    if ($http_authorization = "") { return 401; }
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_pass http://127.0.0.1:PORT;
}

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.