/

CVE-2026-55638

Severity:

HIGH RISK

(8.6)

Missing Codex Route Authorization (CWE-862) in 9Router

CVE-2026-55638

Deferred

Vulnerability type

Category:

Authorization Bypass

CWE:

CWE-862, CWE-863

Impact:

Unauthorized Use of Upstream LLM Provider Credentials

Severity:

HIGH RISK

(8.6)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

An authorization flaw in 9Router leaves the /codex/* endpoint unprotected, allowing requests to bypass the API-key gate used for other API routes.

Under certain configurations, a remote unauthenticated attacker can trigger upstream LLM provider calls using operator-stored credentials, potentially consuming resources and exposing sensitive usage patterns.

Affected context

This vulnerability appears in 9Router deployments that rely on src/dashboardGuard.js to enforce API-key protection for core routes such as /v1, /v1beta, /api/v1, and /api/v1beta.

It surfaces when Next.js rewrites /codex/* to /api/v1/responses, but /codex itself is omitted from the guard logic, leaving a path that can be invoked without passing through the intended authorization checks.

Exploit preconditions

  • Attack surface: Public HTTP endpoints exposed by the 9Router instance
  • Required access: No prior authentication; the attacker only needs network access to the router
  • Trigger point: Sending requests directly to /codex/*, which are rewritten to /api/v1/responses without API-key enforcement
  • Why exploitation is possible: The authorization middleware is applied selectively to known API paths and omits /codex, creating an inconsistent access control policy (CWE-862/863) that can be abused to reach protected behavior via an unguarded route

Why this happens

The underlying bug is an incomplete access control configuration, where the authorization guard in src/dashboardGuard.js is applied to several canonical API paths but fails to include the /codex route.

Because Next.js rewrites /codex/* to /api/v1/responses, the logical behavior of a protected endpoint can be reached through an unprotected alias.

This maps to CWE-862: Missing Authorization and CWE-863: Incorrect Authorization, where a mismatch between intended policy and actual enforcement leaves sensitive functionality exposed.

Potential impact

  • An attacker may trigger upstream LLM provider calls using operator-managed credentials.
  • An attacker could consume API quotas and incur unexpected costs for the operator.
  • An attacker can potentially infer or abuse prompt-handling behavior and application logic mediated by the router.
  • The system may log attacker-driven traffic under legitimate provider accounts, skewing monitoring and analytics.

General mitigation guidance

Effective mitigation centers on making access control consistent and centralized rather than path-specific and ad hoc.

Typical defensive patterns include:

  • Applying authorization middleware at a common entry point for all API-like routes, including rewrites and aliases.
  • Defining an explicit allowlist or policy that binds access decisions to capabilities rather than URL fragments.
  • Ensuring that route rewrites and proxy rules are subject to the same access checks as their target endpoints.
  • Minimizing the number of distinct code paths that can reach sensitive operations such as upstream provider calls, and running those paths under least-privilege credentials.

How teams detect issues like this

Organizations can look for similar issues by:

  • Reviewing route definitions, rewrite rules, and middleware chains to confirm that all externally reachable paths pass through authorization checks.
  • Using static analysis or configuration linters to flag endpoints that invoke sensitive operations without preceding auth or policy enforcement.
  • Implementing tests that simulate unauthenticated requests across the full route surface, including aliases and rewrites, and verifying consistent access denial.
  • Applying policy-as-code tools that enforce mandatory authorization for categories of routes, such as anything that proxies requests to external providers.

Sources

SourceLink
github.comgithub.com/decolua/9router/commit/b282f0554972ea35281520738759d76abcd0b0b3
github.comgithub.com/decolua/9router/releases/tag/v0.5.2
github.comgithub.com/decolua/9router/security/advisories/GHSA-8gmq-j984-vp4r

Frequently asked

questions

Yes, if the 9Router instance exposes the /codex/* path publicly, a remote unauthenticated attacker can send requests to it without an API key.

The attacker only needs network reachability to the router; no valid credentials or API keys are required to hit the unguarded /codex/* route.

Consolidate authorization checks so that all API and rewrite paths, including /codex, pass through a single, mandatory authentication and authorization layer before invoking upstream providers.

Treat access control as a cross-cutting concern: centralize auth middleware, verify that rewrites and aliases inherit the same policies, enforce access-control tests in CI, and use configuration review or automated tools to detect endpoints that perform sensitive actions without explicit authorization.

Find out what's already
exploitable in your codebase.