# CVE-2026-40575: OAuth2 Proxy 7.15.2 through 7.15.4 Authentication Bypass via X-Forwarded-Uri Under the Default Trusted Proxy Set

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** CRITICAL 9.3
- **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:N`
- **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
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** Yes (see exploit references)
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.76% (percentile 52, 2026-11-26)
- **CWE:** CWE-290
- **Aliases:** BIT-oauth2-proxy-2026-40575, BIT-oauth2-proxy-2026-76835, CVE-2026-76835, GHSA-7x63-xv5r-3p2x, GO-2026-5236
- **Published:** 2026-04-15T19:21:06.000Z
- **Modified:** 2026-11-11T23:10:00.263Z

## 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

## 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

- Go `github.com/oauth2-proxy/oauth2-proxy/v7`: affected \>= 7.5.0, \< 7.15.2; fixed 7.15.2 (osv)
- Go `github.com/oauth2-proxy/oauth2-proxy`: affected see advisory; fixed no fix listed yet (osv)
- oauth2-proxy: \>= 7.15.2, \<= 7.15.4 (cvelist)

## Mitigation

- Upgrade github.com/oauth2-proxy/oauth2-proxy/v7 to 7.15.2 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
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.
```

## 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.

## References

- vendor: <https://github.com/oauth2-proxy/oauth2-proxy/security/advisories/GHSA-7x63-xv5r-3p2x>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2026-40575>
- exploit: <https://github.com/oauth2-proxy/oauth2-proxy/issues/3506>
- article: <https://github.com/oauth2-proxy/oauth2-proxy/blob/v7.15.4/pkg/apis/middleware/scope.go>
- other: <https://github.com/oauth2-proxy/oauth2-proxy>
- other: <https://www.vulncheck.com/advisories/oauth2-proxy-through-authentication-bypass-via-x-forwarded-uri-under-the-default-trusted-proxy-set>
- other: <https://access.redhat.com/security/cve/CVE-2026-40575>
- other: <https://bugzilla.redhat.com/show_bug.cgi?id=2460449>
- other: <https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-40575.json>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-40575>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-7x63-xv5r-3p2x> (license: <https://creativecommons.org/licenses/by/4.0/>)
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GO-2026-5236> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2026-40575> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-40575>
