Horizon Alert
Summary of the vulnerability and why it matters
OAuth2 Proxy may incorrectly trust a user-supplied header, allowing an attacker to bypass authentication. This means protected routes could be accessed without a valid session. This is a significant concern for deployments using this proxy for authentication.
- Bypasses authentication checks.
- Attackers can access protected routes.
- Affects specific configurations.
Attack Path
How an attacker could exploit the issue
An unauthenticated attacker can bypass authentication to protected routes. This is achieved by sending a specially crafted `X-Forwarded-Uri` header that tricks OAuth2 Proxy into evaluating skip-auth rules against an unintended path. This allows access to resources that should be protected, provided the proxy is configured with `--reverse-proxy` and either `--skip-auth-regex` or `--skip-auth-route`.
- Requires `--reverse-proxy` enabled.
- Targets authentication bypass.
- Requires configured skip-auth rules.
Live Threat
Current exploitation, exposure, and threat context
Attackers may find this vulnerability appealing due to its direct impact on authentication bypass, allowing unauthenticated access to protected routes. Exploitation appears feasible by manipulating a specific HTTP header in carefully configured environments. While the vulnerability is critical, its weaponization is contingent on the specific deployment of OAuth2 Proxy with enabled `--reverse-proxy` and either `--skip-auth-regex` or `--skip-auth-route` configurations.
- Exploitation depends on specific configurations.
- Public exploit code is not yet observed.
- Patch available in v7.15.2.
Priority actions
Operational Fix
Recommended remediation, mitigation, and detection steps
Prioritize patching OAuth2 Proxy to version 7.15.2 to address the critical authentication bypass vulnerability. If immediate patching is not feasible, implement header manipulation controls at your edge or load balancer to prevent spoofed `X-Forwarded-Uri` headers from reaching the proxy.
- Apply patch v7.15.2.
- Block client `X-Forwarded-Uri` headers.
- Monitor for unauthenticated access attempts.