OAuth2 Proxyで偽装IPヘッダーにより認証を回避される
Summary
未認証の攻撃者が、クライアントIPヘッダーを偽装して信頼済みIPからのアクセスを装い、OAuth2 Proxyの認証を回避できる脆弱性です。重大度はCriticalで、CVSS v3のスコアは9.1です。修正版の情報は確認できていないため、最新の情報を確認してください。
AI summary
Written by an external AI model and may contain mistakes. Check the original description and references below before acting on it.
未認証の攻撃者が、クライアントIPヘッダーを偽装して信頼済みIPからのアクセスを装い、OAuth2 Proxyの認証を回避できる脆弱性です。重大度はCriticalで、CVSS v3のスコアは9.1です。修正版の情報は確認できていないため、最新の情報を確認してください。
Original description The description as published by the source.
Impact
OAuth2 Proxy's optional trusted-IP authentication exemption can be bypassed by
spoofing client-IP headers. An unauthenticated remote attacker can cause their
request to be treated as coming from an IP address configured in --trusted-ip,
bypassing OAuth2 Proxy authentication on protected routes, including access
authorized through the auth-only endpoint.
Affected deployments have both --trusted-ip (or trusted_ips) configured and
--reverse-proxy=true (or reverse_proxy=true), and allow an attacker-controlled
client-IP header to reach OAuth2 Proxy. There are two related issues:
- Missing transport-peer trust: The trusted-IP authorization decision
accepts the configured--real-client-ip-headerwithout first verifying that
the connecting peer is a trusted proxy. An attacker who can reach OAuth2 Proxy
directly, or through a proxy that passes through that header, can supply an
exempt address. Configuring--trusted-proxy-ip, where available, does not
by itself protect this authorization path. - Incorrect X-Forwarded-For chain: When
--real-client-ip-header=X-Forwarded-Foris configured, OAuth2 Proxy selects
the leftmost address. An attacker-supplied exempt address can remain leftmost
when a legitimate proxy appends the actual client address. This can be
exploited even when direct access to OAuth2 Proxy is blocked.
Successful exploitation grants a hacker full access normally available through
the IP exemption. Deployments without…
Source: GitHub Repository Security Advisories (Game のスタック) GitHub Advisory OSV
References
- GITHUB_REPO_ADVISORY oauth2-proxy/oauth2-proxy