/

CVE-2026-81027

Severity:

HIGH RISK

(8.5)

Authorization Bypass (CWE-862) in one-api Channels

CVE-2026-81027

Deferred

Vulnerability type

Category:

Missing Authorization

CWE:

CWE-862

Impact:

Unauthorized channel access and upstream credential misuse

Severity:

HIGH RISK

(8.5)

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

A missing authorization check in one-api allows an authenticated, low-privilege account to select arbitrary channel identifiers through a URL path parameter. The server may then send upstream requests using a channel's stored provider key, bypassing group restrictions and model allowlists.

Affected context

The vulnerability occurs in deployments where authenticated requests can reach the channel-selection route and where channel identifiers are accepted from URL parameters. The selected channel is loaded without verifying that it belongs to the requesting user or group, allowing the request to use channels outside the caller's authorized scope.

Exploit preconditions

  • Attack surface: An authenticated API route that accepts a channel identifier

in the URL path

  • Required access: A valid one-api API token; administrative privileges are

not required

  • Trigger point: Channel selection during request distribution
  • Why exploitation is possible: The path-parameter branch does not perform

the role, ownership, or group authorization checks applied to the alternate

channel-pinning path

  • Resulting trust issue: The distributor can load an out-of-scope channel and

use its configured upstream credentials and endpoint

Why this happens

The underlying bug is an inconsistent authorization design. One channel-pinning path requires an administrative check, while another accepts a caller-controlled channel identifier after token authentication alone. The distributor then retrieves the referenced channel by numeric identifier without enforcing ownership, group membership, or equivalent policy scope. This maps to CWE-862: Missing Authorization, because a protected operation is reachable without checking whether the authenticated principal is permitted to perform it.

Potential impact

  • A low-privilege account may access channels outside its assigned scope
  • The server could make upstream requests using provider keys not granted to the account
  • Per-group channel restrictions may be bypassed
  • Model allowlists may be bypassed
  • Provider quotas, billing accounts, or reputation could be misused
  • Sensitive upstream responses or operational metadata could be exposed

General mitigation guidance

Mitigation generally focuses on enforcing authorization at the point where the

channel is selected and again before its credentials are used.

Common defensive patterns include:

  • Applying the same role, ownership, group, and model-policy checks to every

channel-selection path

  • Deriving permitted channels from the authenticated principal rather than

trusting a client-supplied identifier

  • Centralizing channel authorization in a shared policy or service layer
  • Using deny-by-default behavior when ownership or group scope is missing
  • Avoiding exposure of provider credentials to request paths that have not passed

authorization

  • Applying least privilege to channel records, upstream credentials, and provider

accounts

  • Recording authorization decisions and limiting anomalous channel-selection

behavior

How teams detect issues like this

Detection approaches can include:

  • Static analysis for route parameters that flow into resource lookups without

nearby authorization checks

  • Code review searches for direct channel or tenant retrieval by client-supplied

identifiers

  • Policy tests covering cross-user, cross-group, and non-administrative access
  • Integration tests verifying that model allowlists and group restrictions are

enforced on every routing path

  • Runtime logging of the authenticated principal, selected channel, group scope,

and authorization decision without recording secret values

  • API gateway or application policies that reject channel selections outside the

caller's resolved authorization scope

Automated review tools may help identify inconsistent checks, but authorization

behavior should also be validated with end-to-end tests.

Sources

SourceLink
github.comgithub.com/songquanpeng/one-api
github.comgithub.com/songquanpeng/one-api/blob/v0.6.10/middleware/auth.go
github.comgithub.com/songquanpeng/one-api/issues/2410
vulncheck.comvulncheck.com/advisories/one-api-through-0.6.10-missing-authorization-on-url-parameter-channel-pinning

Frequently asked

questions

Any account with a valid API token may be able to reach the affected path.

Administrative privileges are not generally required, although deployment-specific

routing and authentication controls still determine practical exposure.

No. The server may select the channel and use its stored provider key when

forwarding the request, so the caller does not need direct access to that secret.

Enforce authorization for the selected channel using the authenticated user's

role, group, ownership, and model policy before loading or using channel

credentials. Apply the same centralized check to every channel-selection path.

Treat resource identifiers from clients as untrusted, use deny-by-default

authorization, and test every route for cross-user and cross-group access.

Logging authorization decisions and enforcing least privilege can provide

additional protection.

Find out what's already
exploitable in your codebase.