oauth2_proxy projectのoauth2_proxyにおけるスプーフィングによる認証回避に関する脆弱性
タイトル oauth2_proxy projectのoauth2_proxyにおけるスプーフィングによる認証回避に関する脆弱性
概要

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によって設定され、クライアントからそのまま渡されないようにしてください。

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

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

公表日 2026年4月22日0:00
登録日 2026年4月30日12:28
最終更新日 2026年4月30日12:28
CVSS3.0 : 緊急
スコア 9.1
ベクター CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
影響を受けるシステム
oauth2_proxy project
oauth2_proxy 7.5.0 以上 7.15.2 未満
CVE (情報セキュリティ 共通脆弱性識別子)
CWE (共通脆弱性タイプ一覧)
ベンダー情報
変更履歴
No 変更内容 変更日
1 [2026年04月30日]
  掲載
2026年4月30日12:28

NVD脆弱性情報
CVE-2026-40575
概要

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.

公表日 2026年4月22日9:16
登録日 2026年4月25日4:04
最終更新日 2026年4月28日4:29
影響を受けるソフトウェアの構成
構成1 以上 以下 より上 未満
cpe:2.3:a:oauth2_proxy_project:oauth2_proxy:*:*:*:*:*:*:*:* 7.5.0 7.15.2
関連情報、対策とツール
共通脆弱性一覧