Skip to main content

CVE-2026-59801 — Vulnerability in 9router — CVE Details

CRITICAL

9router has unauthenticated CRUD on /api/providers and Full API Key Leak via /api/usage/stats

Published July 6, 2026Updated July 15, 2026Source: OSV

What Should I Do?

Address in Next Maintenance Window

Low exploitation probability (2.91%). Schedule for your next planned update.

Does your project use an affected 9router version?

Paste your package-lock.json to check it for CVE-2026-59801 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.

Check my package-lock.json

Summary


title: Unauthenticated CRUD on /api/providers and Full API Key Leak via /api/usage/stats product: 9Router version: <= 0.4.41 severity: critical cve_request: true

Summary

Multiple critical API security vulnerabilities were discovered in 9Router's Next.js dashboard. The /api/providers endpoints lack authentication entirely, allowing anyone to create, read, update, and delete provider connections. Additionally, /api/usage/stats exposes full plaintext API keys, and /api/usage/request-logs + /api/usage/request-details expose all users' request history and full conversation contents (including system prompts, user messages, assistant responses) without authentication.

Affected Endpoints

EndpointMethodIssue
/api/providersGETLists all provider connections with partial credentials, OAuth tokens, account IDs
/api/providers/:idGETRead any single provider detail (IDOR)
/api/providersPOSTCreate arbitrary provider connections with attacker-controlled API keys
/api/providers/:idPUTModify any existing provider connection
/api/providers/:idDELETEDelete any provider connection
/api/usage/statsGETExposes full plaintext API keys, per-account usage breakdown, cost data
/api/usage/request-logsGETExposes all users' request logs (model, tokens, cost, timestamp, provider)
/api/usage/request-details/:idGETExposes full conversation turns including system prompts, user messages, assistant responses
/api/versionGETExposes current version info
/api/modelsGETExposes full model routing catalog
/api/v1/modelsGETExposes model list

Impact

Critical: Provider CRUD without authentication

An attacker can:

  1. Add a malicious provider — inject a provider that proxies through their server, capturing all prompts, responses, and API keys routed through 9Router
  2. Modify existing providers — replace API keys with attacker-controlled ones, redirect traffic
  3. Delete all providers — cause complete denial of service
  4. Read all provider configurations — harvest partial credentials, GitHub Copilot OAuth tokens, Cloudflare account IDs, email addresses

Critical: Full API key leak via /api/usage/stats

The endpoint returns complete API key strings (e.g., sk-...) in plaintext alongside usage data per key, enabling unauthorized use of connected AI provider accounts.

Critical: Conversation history leak

/api/usage/request-details returns the full conversation history of other users' AI sessions, including system prompts, user messages, assistant responses, tool calls, and reasoning traces.

Steps to Reproduce

1. Unauthenticated read of all providers

curl -s https://<host>/api/providers

Returns all provider connections with email addresses, auth type, account IDs, and partial API key prefixes.

2. Create a provider without authentication

curl -X POST https://<host>/api/providers \
  -H "Content-Type: application/json" \
  -d '{"provider":"openai","authType":"apikey","name":"rogue","apiKey":"sk-attacker-controlled"}'

Returns the created connection object with a new UUID and isActive: true.

3. Modify an existing provider without authentication

curl -X PUT https://<host>/api/providers/<existing-uuid> \
  -H "Content-Type: application/json" \
  -d '{"name":"modified","apiKey":"sk-attacker-key"}'

Returns the updated connection object.

4. Delete a provider without authentication

curl -X DELETE https://<host>/api/providers/<existing-uuid>

Returns {"message":"Connection deleted successfully"}.

5. Read full usage stats with API keys

curl -s https://<host>/api/usage/stats

Returns full API key strings, per-account token/cost breakdown, recent requests.

6. Read request logs

curl -s "https://<host>/api/usage/request-logs?page=1&pageSize=50"

Returns paginated request logs with timestamps, models, providers, user emails, token counts.

7. Read full conversation

curl -s https://<host>/api/usage/request-details/<request-uuid>

Returns complete conversation turns for that request.

8. Read version info

curl -s https://<host>/api/version

Returns {"currentVersion":"0.4.19","latestVersion":"0.4.45","hasUpdate":true}.

Root Cause

The Next.js API routes under src/app/api/* lack authentication middleware on several endpoints. Specifically:

  • /api/providers/* — No auth check before CRUD operations on provider connections stored in the database
  • /api/usage/stats — No auth check before returning aggregated usage data including full API keys
  • /api/usage/request-logs — No auth check before returning request history
  • /api/usage/request-details/:id — No auth check before returning full conversation contents

Suggested Fix

  1. Add authentication middleware to all /api/providers/* routes (GET, POST, PUT, DELETE)
  2. Add authentication middleware to all /api/usage/* routes
  3. Never return full API key strings in any API response — return masked keys only
  4. Never return GitHub Copilot tokens or similar OAuth secrets in API responses
  5. Implement proper authorization checks so users can only access their own data
  6. Add rate limiting to public endpoints

Resources

Advisory Timeline

  • First published July 6, 2026 (143 days ago).
  • Last revised July 15, 2026 — 8 days after initial publication.

Affected Packages (1)

Affects 1 ecosystem: npm (1).

PackageFixed In
9router npm · Affected: All versionsRange-based data available

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 10.0 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High

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

Frequently Asked Questions

What is CVE-2026-59801?
9router has unauthenticated CRUD on /api/providers and Full API Key Leak via /api/usage/stats. This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 10.0/10).
How do I check if my project is affected by CVE-2026-59801?
CVE-2026-59801 affects 9router. It has a 2.9% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-59801 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
10.0

Maximum impact if exploited, often with little effort or access required.

EPSS Score (30-day exploit probability)
2.91%
EPSS percentile: 87.7

This places it in the top quartile of EPSS-scored vulnerabilities — 87.7% of tracked vulnerabilities score at or below it, so it is more likely to be exploited than most of the tracked corpus.

Also Known As

GHSA-vjc7-jrh9-9j86
CVE-2026-62327
CVE-2026-62328

Related CVEs

  • CVE-2026-76807
    CRITICAL

    Todoist MCP Server: Browser DNS rebinding lets websites write and delete Todoist data through local MCP server

  • CVE-2026-46339
    CRITICAL

    9router: Unauthenticated Remote Code Execution via unprotected MCP custom plugin routes

  • CVE-2026-59800
    CRITICAL

    9router: Missing Authorization and OS Command Injection

  • CVE-2026-49352
    CRITICAL

    9router's Hardcoded Default fallback JWT Secret Allows Authentication Bypass

  • CVE-2026-114516
    CRITICAL

    Etherpad: Pre-auth arbitrary file read

  • CVE-2026-55500
    CRITICAL

    9routers has Exposure of Sensitive Information and Unprotected Database Import/Export, Allowing Complete Credential Theft and Database Takeover

  • CVE-2026-56677
    HIGH

    9Router: Authenticated Server-Side Request Forgery (SSRF) via OIDC Provider Test Endpoint

  • CVE-2026-55638
    HIGH

    9router: Unauthenticated LLM proxy access via /codex rewrite authorization bypass

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my package-lock.json