CVE-2026-40575 Details
Description
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.
A critical authentication bypass vulnerability has been identified in OAuth2 Proxy versions 7.5.0 prior to 7.15.2. When the reverse proxy feature is enabled, along with skip authentication rules, the application may incorrectly trust client-supplied X-Forwarded-Uri headers. This allows attackers to manipulate the header and bypass authentication, accessing protected routes without a valid session. The vulnerability affects deployments using OAuth2 Proxy with reverse proxy enabled and at least one skip authentication rule.
Users can upgrade to OAuth2 Proxy version 7.15.2 or later, and should use the new --trusted-proxy-ip flag to specify which IPs or CIDR ranges are allowed to send X-Forwarded headers. For those who cannot upgrade immediately, it is recommended to strip client-provided X-Forwarded-Uri headers at the reverse proxy or load balancer level, overwrite X-Forwarded-Uri with the actual request URI before forwarding to OAuth2 Proxy, restrict direct client access to OAuth2 Proxy, and remove or narrow skip-auth-route or skip-auth-regex rules where possible.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Apr 22, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-290 | Authentication Bypass by Spoofing | redhat-SADP |
| CWE-290 | Authentication Bypass by Spoofing | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| oauth2 proxy project oauth2 proxy | >= 7.5.0, < 7.15.2 |
CPE
Remediation
| |
Change History
6 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jul 15, 2026 | CVE Modified | redhat-SADP |
| Jun 30, 2026 | CVE Modified | redhat-SADP |
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Apr 27, 2026 | Initial Analysis | [email protected] |
| Apr 22, 2026 | New CVE Received | [email protected] |