CVE-2026-40575
OAuth2 Proxy 7.15.2 through 7.15.4 Authentication Bypass via X-Forwarded-Uri Under the Default Trusted Proxy Set
Also known as BIT-oauth2-proxy-2026-40575, BIT-oauth2-proxy-2026-76835, CVE-2026-76835, GHSA-7x63-xv5r-3p2x, GO-2026-5236
Mitigation
- Upgrade github.com/oauth2-proxy/oauth2-proxy/v7 to 7.15.2 or later.
Who should check
- Projects that depend on Go package github.com/oauth2-proxy/oauth2-proxy/v7 (>= 7.5.0, < 7.15.2)
- Projects that depend on Go package github.com/oauth2-proxy/oauth2-proxy
- Anyone running oauth2-proxy >= 7.15.2, <= 7.15.4
Vulnerability facts
- Affected
- github.com/oauth2-proxy/oauth2-proxy/v7 >= 7.5.0, < 7.15.2; github.com/oauth2-proxy/oauth2-proxy
- Fixed in
- 7.15.2
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- Yes: see the exploit references below
- Remote exploitation
- Remote, no login needed
- CVSS
- 9.3 (v4.0, CNA)CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:NOpen in CVSS calculator
Show all 11 CVSS metrics
- Attack vector: Network
- Attack complexity: Low
- Attack requirements: None
- Privileges required: None
- User interaction: None
- Confidentiality impact: High
- Integrity impact: High
- Availability impact: None
- Confidentiality impact on other systems: None
- Integrity impact on other systems: None
- Availability impact on other systems: None
- EPSS
- 0.76% chance of exploitation in 30 days (percentile 52, 2026-11-26)
- CWE
- CWE-290
- Modified
Description
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 in pkg/requests/util/util.go prefers that header over the real request URI whenever CanTrustForwardedHeaders returns true, and isAllowedPath in oauthproxy.go matches the skip_auth_routes and skip_auth_regex allow list against the resulting path. CanTrustForwardedHeaders in pkg/apis/middleware/scope.go 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.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| Go github.com/oauth2-proxy/oauth2-proxy/v7 | >= 7.5.0, < 7.15.2 | 7.15.2 | osv |
| Go github.com/oauth2-proxy/oauth2-proxy | — | — | osv |
| oauth2-proxy | >= 7.15.2, <= 7.15.4 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2026-40575. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2026-40575.md Affected: github.com/oauth2-proxy/oauth2-proxy/v7 >= 7.5.0, < 7.15.2; github.com/oauth2-proxy/oauth2-proxy Fixed in: 7.15.2 Steps: 1. Search this machine and project for github.com/oauth2-proxy/oauth2-proxy/v7 (Go), github.com/oauth2-proxy/oauth2-proxy (Go), oauth2-proxy: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
Exploits and PoCs
Other
- https://github.com/oauth2-proxy/oauth2-proxy
- https://www.vulncheck.com/advisories/oauth2-proxy-through-authentication-bypass-via-x-forwarded-uri-under-the-default-trusted-proxy-set
- https://access.redhat.com/security/cve/CVE-2026-40575
- https://bugzilla.redhat.com/show_bug.cgi?id=2460449
- https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-40575.json
FAQ
Is CVE-2026-40575 being exploited?
There is no confirmed exploitation: CVE-2026-40575 is not in the CISA Known Exploited Vulnerabilities catalog. Public exploit code or a proof of concept is available. EPSS estimates a 0.76% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2026-40575?
Critical: CVSS 9.3 (v4.0, scored by CNA). Remote, no login needed.
Which versions are affected by CVE-2026-40575?
github.com/oauth2-proxy/oauth2-proxy/v7 >= 7.5.0, < 7.15.2; github.com/oauth2-proxy/oauth2-proxy.
Is there a fix for CVE-2026-40575?
Yes. Fixed in 7.15.2. Upgrade github.com/oauth2-proxy/oauth2-proxy/v7 to 7.15.2 or later.
How do I check if I'm affected by CVE-2026-40575?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.