Skip to content
Threat Feed
high advisory

Authentication Bypass in 9router Public LLM API

9router is vulnerable to an authentication bypass via a spoofable X-9r-Real-Ip HTTP header, allowing unauthenticated attackers to access LLM API endpoints.

CVE search metadata

CVE search record: CVE-2026-56681. Severity: high. CVSS: 7.3. KEV: no. Product: 9router-app (<= 0.5.4). Brief: Authentication Bypass in 9router Public LLM API. Brief link: https://feed.craftedsignal.io/briefs/2026-09-9router-auth-bypass/

9router versions 0.5.4 and earlier contain a critical authentication bypass vulnerability (CVE-2026-56681) within the public LLM API layer. The application improperly trusts the user-supplied 'X-9r-Real-Ip' HTTP header to determine if a request originates from the local host (localhost). Under default deployment modes where the intended 'custom-server.js' security wrapper is absent, the application fails to strip or sanitize this header from inbound client traffic. A remote, unauthenticated attacker can inject 'X-9r-Real-Ip: 127.0.0.1' into HTTP requests to 'isLocalRequest()', which then instructs 'canAccessPublicLlmApi()' to waive mandatory API key validation. This vulnerability permits unauthorized access to the LLM provider resources configured by the instance owner, potentially leading to significant financial loss and account abuse.

Attack Chain

  1. Attacker identifies a target 9router instance exposed via port 80/443 without the custom-server.js wrapper.
  2. Attacker crafts an HTTP GET request to a protected endpoint, such as '/api/v1/models'.
  3. Attacker adds the header 'X-9r-Real-Ip: 127.0.0.1' to the HTTP request.
  4. The 9router application receives the request and executes 'isLocalRequest()' in 'src/dashboardGuard.js'.
  5. The application erroneously reads the spoofed header value and returns 'true' for local origin validation.
  6. The logic proceeds to 'canAccessPublicLlmApi()', which identifies the request as 'local' and skips API key authentication.
  7. The application returns '200 OK', granting the attacker access to the model catalog and provider proxy.

Impact

Successful exploitation allows unauthenticated remote attackers to bypass API key enforcement on the public LLM API. Impact includes the unauthorized consumption of the instance owner's paid LLM API credits, unauthorized access to configured provider infrastructure, enumeration of private model configurations, and potential abuse of upstream LLM provider accounts.

Recommendation

  • Upgrade 9router to a version that implements secure transport-level source validation, or ensure deployment uses the required 'custom-server.js' wrapper to sanitize headers.
  • Implement a web application firewall (WAF) rule to block or strip the 'X-9r-Real-Ip' header from any incoming public traffic.
  • Deploy the Sigma rule below to detect attempts to access the '/api/v1/' path with the malicious header present in web server logs.
  • Audit current environment configurations to ensure 'custom-server.js' is correctly protecting all public-facing instances.

Immediate actions

Block X-9r-Real-Ip header from public traffic at WAF/edge

SOC 24h

Mitigations

Upgrade 9router to latest version or ensure custom-server.js usage

immediate IT Operations

CVE-2026-56681

Detection coverage 1

Detects CVE-2026-56681 Exploitation - 9router Auth Bypass

high

Detects unauthorized access to 9router API endpoints via spoofed X-9r-Real-Ip header

sigma tactics: initial_access techniques: T1190 sources: webserver

Detection queries are available on the platform. Get full rules →