CVE-2026-40575
CriticalCVSS 9.1Exploitation Probability (EPSS)
Low risk38th percentile - higher than 38% of all known CVEs
Summary
OAuth2 Proxy versions 7.5.0 through 7.15.1 may trust a client-supplied `X-Forwarded-Uri` header when `--reverse-proxy` is enabled and `--skip-auth-regex` or `--skip-auth-route` is configured. An attacker can spoof this header to bypass authentication and access protected routes without a valid session.
Risk Assessment
An unauthenticated remote attacker can bypass authentication and access protected resources, potentially leading to data confidentiality and integrity breaches.
Recommendation
Upgrade OAuth2 Proxy to version 7.15.2 immediately. If upgrade is not possible, remove or narrow `--skip-auth-regex`/`--skip-auth-route` rules and configure the reverse proxy to strip or overwrite the `X-Forwarded-Uri` header.
Other vulnerabilities in OAuth2 Proxy
See all- CVE-2017-1000069High
CVE-2017-1000069 describes a CSRF vulnerability in oauth2_proxy version 2.1 that can occur during the authentication flow.
- CVE-2026-76835Critical
OAuth2 Proxy honours a client-supplied X-Forwarded-Uri header when deciding whether a request may skip authentication, because the guard added for CVE-2026-40575 is inert in the default reverse-proxy configuration. GetRequestURI prefers that header over the real request URI whenever CanTrustForwardedHeaders returns true, and isAllowedPath matches the skip_auth_routes and skip_auth_regex allow list against the resulting path. CanTrustForwardedHeaders grants that trust when the caller's address is in the trusted proxy set, and buildTrustedProxyNetSet falls back to defaultTrustedProxyIPs, which is 0.0.0.0/0 and ::/0, whenever reverse proxy mode is enabled without trusted_proxy_ip configured. Every client is therefore treated as a trusted proxy. An unauthenticated attacker can request a protected upstream path while setting X-Forwarded-Uri to a value matching an allow-listed route, so the skip-auth decision is made against the spoofed value while the upstream receives the protected path unchanged.
- CVE-2026-34457Critical
OAuth2 Proxy prior to version 7.15.2 contains an authentication bypass vulnerability in deployments using auth_request (e.g., nginx auth_request) with --ping-user-agent or --gcp-healthchecks enabled. The vulnerability allows access to protected upstream resources without authentication.
- CVE-2026-34454Low
A regression introduced in OAuth2 Proxy 7.11.0 prevents clearing the session cookie when rendering the sign-in page. In deployments relying on the sign-in page as part of the logout flow, a user may be shown the sign-in page while the existing session cookie remains valid, meaning the browser session is not actually logged out. On shared workstations, a subsequent user could continue the previous user's authenticated session. This is fixed in version 7.15.2.
Original NVD description (English source)
OAuth2 Proxy is a reverse proxy that provides authentication using OAuth2 providers. Versions 7.5.0 through 7.15.1 may trust a client-supplied `X-Forwarded-Uri` header when `--reverse-proxy` is enabled and `--skip-auth-regex` or `--skip-auth-route` is configured. An attacker can spoof this header so OAuth2 Proxy evaluates authentication and skip-auth rules against a different path than the one actually sent to the upstream application. This can result in an unauthenticated remote attacker bypassing authentication and accessing protected routes without a valid session. Impacted users are deployments that run oauth2-proxy with `--reverse-proxy` enabled and configure at least one `--skip-auth-regex` or `--skip-auth-route` rule. This issue is patched in `v7.15.2`. Some workarounds are available for those who cannot upgrade immediately. Strip any client-provided `X-Forwarded-Uri` header at the reverse proxy or load balancer level; explicitly overwrite `X-Forwarded-Uri` with the actual request URI before forwarding requests to OAuth2 Proxy; restrict direct client access to OAuth2 Proxy so it can only be reached through a trusted reverse proxy; and/or remove or narrow `--skip-auth-regex` / `--skip-auth-route` rules where possible. For nginx-based deployments, ensure `X-Forwarded-Uri` is set by nginx and not passed through from the client.
Vulnerability data from NVD (NIST) · CISA KEV · EPSS

