CVE-2026-76835
Description
A flaw was found in oauth2-proxy. When configured in reverse-proxy mode without explicit trusted proxy settings, the application defaults to treating all incoming network traffic as originating from trusted proxies. A remote, unauthenticated attacker can exploit this issue by sending a request with a forged X-Forwarded-Uri header that matches an allow-listed path. As a result, the proxy bypasses authentication controls and grants unauthorized access to protected upstream services.
Statement
This vulnerability is rated as Important severity as an unauthenticated remote attacker can bypass authentication checks to access protected upstream services without authorization. The issue occurs when OAuth2 Proxy operates in reverse proxy mode with route-skipping rules enabled and lacks an explicitly restricted trusted proxy configuration, causing it to trust header inputs from any remote source. Because authentication enforcement fails before requests are dispatched upstream, unauthorized users can gain full access to sensitive internal endpoints.
This is vulnerability is rated as Important rather than Critical because the reverse proxy mode is required which is not part of the default configuration for Red Hat products.
Mitigation
To mitigate this issue without patching, apply one of the following configuration controls:
1. Restrict trusted proxy IP addresses in OAuth2 Proxy:
Explicitly set the `--trusted-proxy-ip` command-line argument (or the `trusted_proxy_ip` configuration file parameter) to the specific IP address or CIDR range of authorized upstream reverse proxies or load balancers rather than relying on the default:
--trusted-proxy-ip=<TRUSTED_PROXY_IP_OR_CIDR>
2. Sanitize forwarded headers at the perimeter reverse proxy:
Configure intermediate ingress controllers or front-facing reverse proxies (such as NGINX) to strip client-supplied `X-Forwarded-Uri` headers or overwrite them with the actual request URI before forwarding traffic to OAuth2 Proxy:
proxy_set_header X-Forwarded-Uri $request_uri;
Warning: Applying these configuration adjustments requires restarting or reloading the affected OAuth2 Proxy or front-end proxy services, which may cause a brief interruption to active network sessions.
Common Vulnerability Scoring System (CVSS) Score Details
Info alert:Important note
CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).
CVSS v3 Score Breakdown
| Red Hat | NVD | cve.org | |
|---|---|---|---|
| Base Score | 9.1 | N/A | 9.1 |
| Attack Vector | Network | N/A | Network |
| Attack Complexity | Low | N/A | Low |
| Privileges Required | None | N/A | None |
| User Interaction | None | N/A | None |
| Scope | Unchanged | N/A | Unchanged |
| Confidentiality | High | N/A | High |
| Integrity Impact | High | N/A | High |
| Availability Impact | None | N/A | None |
Vector
Red Hat: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
cve.org: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
Understanding the Weakness (CWE)
Access Control
Technical Impact: Bypass Protection Mechanism; Gain Privileges or Assume Identity
This weakness can allow an attacker to access resources which are not otherwise accessible without proper authentication.
Frequently Asked Questions
Not sure what something means? Check out our Security Glossary.
Want to get errata notifications? Sign up here.