An authentication bypass vulnerability exists in OAuth2 Proxy due to improper handling of the X-Forwarded-Uri header. This allows an unauthenticated attacker to access protected upstream paths by spoofing the URI, potentially leading to unauthorized access. The vulnerability arises from OAuth2 Proxy's default configuration, which trusts all proxies. An attacker can bypass authentication by setting the X-Forwarded-Uri header to a value matching an allow-listed route. Administrators and security teams should review their configurations to restrict trusted proxies and prevent exploitation.
OAuth2 Proxy, a reverse proxy providing authentication using OAuth2 providers, has a configuration-dependent authentication bypass in versions 7.5.0 through 7.15.1. Deployments using `skip_auth_routes` or the legacy `skip_auth_regex` with patterns that can be widened by attacker-controlled suffixes are affected. An unauthenticated attacker can send a crafted request containing a number sign in the path to bypass authentication. The issue is fixed in version 7.15.2, which normalizes request paths more conservatively before skip-auth matching.