Vulnerability in github.com/oauth2-proxy/oauth2-proxy/v7 (CVE-2026-40575)
Summary
Vulnerability in github.com/oauth2-proxy/oauth2-proxy/v7 (CVE-2026-40575). Confidential information can be exposed externally. Mitigation: upgrade to 7.15.2 or later.
Original description
The description as published by the source.
Impact
A configuration-dependent authentication bypass exists in OAuth2 Proxy.
Deployments are affected when all of the following are true:
- OAuth2 Proxy is configured with
--reverse-proxy - and at least one rule is defined with
--skip_auth_routesor the legacy--skip-auth-regex
OAuth2 Proxy may trust a client-supplied X-Forwarded-Uri header when --reverse-proxy is enabled and --skip-auth-route or --skip-auth-regex 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.
Patches
This issue is addressed as part of the newly introduced --trusted-proxy-ip flag in v7.15.2. If you leave it unset, OAuth2 Proxy will continue to trust ALL source IPs (0.0.0.0/0) for backwards compatibility, which means a client may still be able to spoof forwarded headers. Therefore after upgrading we urge you to use the new --trusted-proxy-ip flag to set the IPs or CIDR ranges of the reverse proxies that are allowed to send X-Forwarded-* headers and furthermore implement the mitigation steps outlined below to properly configure your load balancer infrastructure.
Mitigation
- Strip any client-provided
X-Forwarded-Uriheader at the reverse proxy or load balancer level - Explicitly overwrite…
Source: NIST National Vulnerability Database NVD GitHub Advisory
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as CVE-2026-40575 has been found in github.com/oauth2-proxy/oauth2-proxy/v7.
Confidential information can be exposed externally. CVSS score: 9.1/10.
What to do: upgrade github.com/oauth2-proxy/oauth2-proxy/v7 to 7.15.2 or later.
If unsure, ask your IT team or search "github.com/oauth2-proxy/oauth2-proxy/v7 CVE-2026-40575" on the vendor's site.
CVE-2026-40575 (github.com/oauth2-proxy/oauth2-proxy/v7) — CWE-290 / CVSS v3 9.1
Attack vector: remote (network-reachable) / unauthenticated / no user interaction
Patched: 7.15.2 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
A vulnerability (CWE-290) exists in github.com/oauth2-proxy/oauth2-proxy/v7.
Check the vendor advisory for the affected versions of github.com/oauth2-proxy/oauth2-proxy/v7.
Severity: Critical (CVSS 9.1/10). Confidential information can be exposed externally.
Update to 7.15.2.
Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'github.com/oauth2-proxy/oauth2-proxy/v7' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1Identify exposure identify
grep -r 'github.com/oauth2-proxy/oauth2-proxy/v7' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
github.com/oauth2-proxy/oauth2-proxy/v7を grep し、稼働しているサービス・バージョンを把握する。 -
2Apply patch patch
Upgrade github.com/oauth2-proxy/oauth2-proxy/v7 to 7.15.2ステージング環境で 7.15.2 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
References
- web github.com
- web access.redhat.com
- web bugzilla.redhat.com
- web security.access.redhat.com
- web nvd.nist.gov
- web github.com