Skip to content
HighVulnerabilityLLM-specific

GHSA-5mj8-gf6m-fhw8: 9Router has an Authentication Bypass in Public LLM API via Spoofable X-9r-Real-Ip Header

Published
Record updated
View JSON
Affected
  • 9router <= 0.5.4
Fixed in
0.5.8
  • released June 21, 2026, 93 days before disclosure
Known exploitation
Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
EPSS
1.1%

Summary

9router decides whether a request is local by trusting the client-supplied X-9r-Real-Ip header in isLocalRequest() within src/dashboardGuard.js. When the app runs without custom-server.js, which normally strips and regenerates that header, an unauthenticated remote attacker can send X-9r-Real-Ip: 127.0.0.1 to reach /api/v1/* without an API key. The reported impact includes unauthorized use of the owner's configured LLM provider connections and consumption of paid API credits. The issue was verified on 9router-app 0.5.4 (Next.js 16.2.9) using GET /api/v1/models.

Mitigation

Do not trust X-9r-Real-Ip (or any X-9r-* header) received directly from clients. Derive the client address for authorization from a trusted transport-level source, such as req.socket.remoteAddress. If custom-server.js is required for the security model, fail closed when its trusted marker is absent and strip or reject inbound client-supplied X-9r-* headers at the edge. Document supported secure startup modes so the header cannot be attacker-controlled.