製品・ソフトウェアに関する情報
oauth2_proxy projectのoauth2_proxyにおけるスプーフィングによる認証回避に関する脆弱性
Title oauth2_proxy projectのoauth2_proxyにおけるスプーフィングによる認証回避に関する脆弱性
Summary

OAuth2 ProxyはOAuth2プロバイダーを使用して認証を提供するリバースプロキシです。バージョン7.5.0から7.15.1までの間で、`--reverse-proxy`が有効でかつ`--skip-auth-regex`または`--skip-auth-route`が設定されている場合、クライアントが送信した`X-Forwarded-Uri`ヘッダーを信頼してしまう可能性があります。攻撃者はこのヘッダーを詐称することで、OAuth2 Proxyが認証およびスキップ認証ルールを実際に上流アプリケーションに送信されたパスとは異なるパスに対して評価させることができます。これにより、認証されていないリモートの攻撃者が認証を回避し、有効なセッションなしで保護されたルートにアクセスできる恐れがあります。影響を受けるユーザーは、`--reverse-proxy`を有効にし、少なくとも1つの`--skip-auth-regex`または`--skip-auth-route`ルールを設定しているoauth2-proxyを実行している環境です。本問題は`v7.15.2`で修正されました。すぐにアップグレードできない場合の回避策としては、リバースプロキシやロードバランサーのレベルでクライアントから提供された`X-Forwarded-Uri`ヘッダーを除去すること、リクエストをOAuth2 Proxyに転送する前に`X-Forwarded-Uri`を実際のリクエストURIで明示的に上書きすること、OAuth2 Proxyへの直接のクライアントアクセスを制限して信頼できるリバースプロキシ経由のみでアクセスできるようにすること、また可能であれば`--skip-auth-regex`および`--skip-auth-route`ルールを削除または絞り込むことが挙げられます。nginxベースの環境では、`X-Forwarded-Uri`がnginxによって設定され、クライアントからそのまま渡されないようにしてください。

Possible impacts 当該ソフトウェアが扱う全ての情報が外部に漏れる可能性があります。 また、当該ソフトウェアが扱う全ての情報が書き換えられる可能性があります。 さらに、当該ソフトウェアは停止しません。 そして、この脆弱性を悪用した攻撃の影響は、他のソフトウェアには及びません。 
Solution

正式な対策が公開されています。ベンダ情報を参照して適切な対策を実施してください。

Publication Date April 22, 2026, midnight
Registration Date April 30, 2026, 12:28 p.m.
Last Update April 30, 2026, 12:28 p.m.
CVSS3.0 : 緊急
Score 9.1
Vector CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
Affected System
oauth2_proxy project
oauth2_proxy 7.5.0 以上 7.15.2 未満
CVE (情報セキュリティ 共通脆弱性識別子)
CWE (共通脆弱性タイプ一覧)
ベンダー情報
Change Log
No Changed Details Date of change
1 [2026年04月30日]
  掲載
April 30, 2026, 12:28 p.m.

NVD Vulnerability Information
CVE-2026-40575
Summary

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.

Publication Date April 22, 2026, 9:16 a.m.
Registration Date April 25, 2026, 4:04 a.m.
Last Update April 28, 2026, 4:29 a.m.
Affected software configurations
Configuration1 or higher or less more than less than
cpe:2.3:a:oauth2_proxy_project:oauth2_proxy:*:*:*:*:*:*:*:* 7.5.0 7.15.2
Related information, measures and tools
Common Vulnerabilities List