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_userprocessed 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_userprocessed 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.

