/

CVE-2026-102895

Severity:

CRITICAL RISK

(9.8)

Authentication Bypass (CWE-287) in GPUStack API Auth

CVE-2026-102895

Received

Vulnerability type

Category:

Authentication Bypass

CWE:

CWE-287, CWE-290, CWE-346

Impact:

Unauthenticated Administrative Access and Potential Code Execution

Severity:

CRITICAL RISK

(9.8)

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

GPUStack's API authentication could treat a request as the built-in administrator when its source appeared to be loopback and localhost authentication was disabled. A remote attacker could exploit how the client IP was determined to gain unauthenticated administrative access, potentially reaching sensitive data and code execution paths.

GPUStack's API authentication could treat a request as the built-in administrator when its source appeared to be loopback and localhost authentication was disabled. A remote attacker could exploit how the client IP was determined to gain unauthenticated administrative access, potentially reaching sensitive data and code execution paths.

Affected context

The issue occurs in GPUStack's API authentication flow, where get_current_user treated loopback requests as the built-in administrator when force_auth_localhost was false. That setting was the default. A remote request could be identified as loopback when it came through a same-host reverse proxy or when client IP handling accepted a client-supplied X-GPUStack-Real-IP value. The reported vulnerability affects deployments before the fix in version 2.2.0.

The issue occurs in GPUStack's API authentication flow, where get_current_user treated loopback requests as the built-in administrator when force_auth_localhost was false. That setting was the default. A remote request could be identified as loopback when it came through a same-host reverse proxy or when client IP handling accepted a client-supplied X-GPUStack-Real-IP value. The reported vulnerability affects deployments before the fix in version 2.2.0.

Exploit preconditions

  • Attack surface: GPUStack's remotely reachable API.
  • Required access: No valid credentials were required if the request was interpreted as originating from loopback.
  • Trigger point: Authentication when get_current_user processed a request with a loopback source address.
  • Why exploitation is possible: IP attribution could accept a same-host proxy peer or a client-supplied loopback value, allowing remote traffic to reach the localhost administrator trust path.
  • Attack surface: GPUStack's remotely reachable API.
  • Required access: No valid credentials were required if the request was interpreted as originating from loopback.
  • Trigger point: Authentication when get_current_user processed a request with a loopback source address.
  • Why exploitation is possible: IP attribution could accept a same-host proxy peer or a client-supplied loopback value, allowing remote traffic to reach the localhost administrator trust path.

Why this happens

The authentication logic treated a network-location signal as sufficient proof of administrator identity. This is an authentication bypass (CWE-287) combined with an origin-validation weakness: an attacker could cause a remote request to be treated as coming from a trusted loopback source (CWE-290, authentication bypass by spoofing) through insufficiently constrained client IP data (CWE-346, origin validation error). Trusting proxy or request-header information without establishing its provenance creates an insecure authorization boundary.

The authentication logic treated a network-location signal as sufficient proof of administrator identity. This is an authentication bypass (CWE-287) combined with an origin-validation weakness: an attacker could cause a remote request to be treated as coming from a trusted loopback source (CWE-290, authentication bypass by spoofing) through insufficiently constrained client IP data (CWE-346, origin validation error). Trusting proxy or request-header information without establishing its provenance creates an insecure authorization boundary.

Potential impact

  • An attacker could gain unauthenticated administrative access.
  • They could change users or models and create persistent administrator API keys.
  • They could disclose worker or cloud-provider secrets.
  • They could reach functionality that may enable code execution.
  • Compromised credentials or configuration could support further access within the environment.
  • An attacker could gain unauthenticated administrative access.
  • They could change users or models and create persistent administrator API keys.
  • They could disclose worker or cloud-provider secrets.
  • They could reach functionality that may enable code execution.
  • Compromised credentials or configuration could support further access within the environment.

General mitigation guidance

Defensive patterns include requiring explicit authentication for administrative actions, including requests received from loopback addresses. Treat client IP headers as untrusted unless they are supplied by specifically trusted proxies, and configure proxy trust narrowly so external clients cannot set authoritative address values. Prefer secure-by-default authentication settings, validate authorization independently of network location, and limit administrative privileges and secret access to the minimum required.

Defensive patterns include requiring explicit authentication for administrative actions, including requests received from loopback addresses. Treat client IP headers as untrusted unless they are supplied by specifically trusted proxies, and configure proxy trust narrowly so external clients cannot set authoritative address values. Prefer secure-by-default authentication settings, validate authorization independently of network location, and limit administrative privileges and secret access to the minimum required.

How teams detect issues like this

Review authentication and authorization code for decisions based solely on source IP, loopback status, or client-supplied forwarding headers. Check proxy configurations to confirm that only trusted peers can supply authoritative client address information. Monitor for administrative API activity without corresponding authenticated sessions, unexpected API-key creation, changes to users or models, and access to worker or cloud-provider secrets. Static analysis and policy checks can flag trust in request headers or network location as an authentication substitute.

Review authentication and authorization code for decisions based solely on source IP, loopback status, or client-supplied forwarding headers. Check proxy configurations to confirm that only trusted peers can supply authoritative client address information. Monitor for administrative API activity without corresponding authenticated sessions, unexpected API-key creation, changes to users or models, and access to worker or cloud-provider secrets. Static analysis and policy checks can flag trust in request headers or network location as an authentication substitute.

Sources

SourceLink
github.comgithub.com/gpustack/gpustack/commit/53f42a6a553542974396d16a4ff6b12bcbedb48d
github.comgithub.com/gpustack/gpustack/pull/5346
github.comgithub.com/gpustack/gpustack/releases/tag/v2.2.0
github.comgithub.com/gpustack/gpustack/security/advisories/GHSA-gj9m-f8ph-pmhr

Frequently asked

questions

Yes. A remote request could be treated as a loopback request under the described proxy or client IP handling conditions, allowing unauthenticated administrative access.

No valid credentials were required for the bypass when the request was accepted through the localhost administrator path.

Require authentication and authorization explicitly, rather than treating loopback origin as proof of identity. Trust client IP information only when it comes from a narrowly defined, trusted proxy.

Use secure-by-default authentication settings, keep network-origin checks separate from identity checks, validate proxy trust boundaries, and review administrative routes for consistent authorization.

Yes. A remote request could be treated as a loopback request under the described proxy or client IP handling conditions, allowing unauthenticated administrative access.

No valid credentials were required for the bypass when the request was accepted through the localhost administrator path.

Require authentication and authorization explicitly, rather than treating loopback origin as proof of identity. Trust client IP information only when it comes from a narrowly defined, trusted proxy.

Use secure-by-default authentication settings, keep network-origin checks separate from identity checks, validate proxy trust boundaries, and review administrative routes for consistent authorization.

Find out what's already
exploitable in your codebase.