CVE-2026-40575
published critical CVSS 3.1 · 9.1OAuth2 Proxy has an Authentication Bypass via X-Forwarded-Uri Header Spoofing
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| oauth2-proxy | — | oauth2-proxy>= 7.5.0, < 7.15.2 | Affected | Not stated | GitHub_M |
| Red Hat | — | rhceph/oauth2-proxy-rhel9Red Hat Ceph Storage 9 | Affected | Not stated | redhat-SADP |
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 flaw was found in OAuth2 Proxy. When configured with `--reverse-proxy` and either `--skip-auth-regex` or `--skip-auth-route`, the proxy may trust a client-supplied `X-Forwarded-Uri` header. An unauthenticated remote attacker can exploit this by spoofing the header, leading to an authentication bypass. This allows unauthorized access to protected routes without a valid session.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 9.1 / 10
- Severity
- critical
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
Additional Assessments
| Version | Score | Severity | Provider | Vector | Scenarios |
|---|---|---|---|---|---|
| 3.1 | 8.7 | high | redhat-SADP · adp | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:N | — |
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| oauth2-proxy | oauth2-proxy | >= 7.5.0, < 7.15.2 (affected) | GitHub_M · cna |
| Red Hat | Red Hat Ceph Storage 9 | Default: affected | redhat-SADP · adp |
Weaknesses
2- CWE-290 CWE-290: Authentication Bypass by Spoofing
- CWE-290 Authentication Bypass by Spoofing
References
4Provider assertions
3GitHub_M · cna
OAuth2 Proxy has an Authentication Bypass via X-Forwarded-Uri Header Spoofing
redhat-SADP · adp
oauth2-proxy: github.com/oauth2-proxy/oauth2-proxy: OAuth2 Proxy: Authentication bypass due to spoofed X-Forwarded-Uri header
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- defba8cc94dcf776efa15c1f3a2c25cddf9a3f81ab49beaf6758655f1380b501
- Ingested
- 23 Sep 2026, 09:13:21 UTC
- Source record
- Official CVE record