CVE-2026-40575: OAuth2 Proxy has an Authentication Bypass via X-Forwarded-Uri Header Spoofing
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.
Security readout for executives and security teams
Plain-English summary
OAuth2 Proxy can be tricked into checking the wrong URL when specific reverse-proxy and skip-auth settings are used. A remote unauthenticated attacker may reach protected application routes without a valid session. The issue is critical because it can expose sensitive data and allow unauthorized changes behind authentication.
Executive priority
Prioritize remediation for any internet-facing affected deployment this week, and immediately for systems protecting sensitive business, customer, or administrative functions. The business risk is unauthorized access behind a trusted authentication gateway, not compromise of OAuth credentials themselves.
Technical view
Versions 7.5.0 through 7.15.1 may trust a client-supplied X-Forwarded-Uri when --reverse-proxy and skip-auth rules are configured. The proxy may evaluate authentication against a spoofed path while forwarding a different protected path upstream. The vendor advisory says v7.15.2 patches the issue.
Likely exposure
Exposure is limited to oauth2-proxy deployments using affected versions with --reverse-proxy enabled and at least one --skip-auth-regex or --skip-auth-route rule. Internet-facing deployments are higher priority, especially where clients can submit X-Forwarded-Uri through a proxy or load balancer.
Exploitation context
The provided sources describe unauthenticated remote bypass potential, but do not show active exploitation. KEV status is false in the bundle. Treat as urgent because attack complexity is low and privileges or user interaction are not required.
Researcher notes
The condition chain matters: affected version, reverse-proxy mode, and skip-auth rules. The root issue is trust in forwarded URI metadata from an untrusted client path. Validate configuration and proxy header normalization before concluding exposure. Sources do not provide proof-of-concept details or exploitation telemetry.
Mitigation direction
Upgrade oauth2-proxy to v7.15.2.
Strip client-provided X-Forwarded-Uri at the edge proxy or load balancer.
Overwrite X-Forwarded-Uri with the actual request URI before oauth2-proxy.
Restrict direct client access to oauth2-proxy.
Remove or narrow skip-auth regex and route rules where possible.
For nginx, set X-Forwarded-Uri explicitly instead of passing client values.
Validation and detection
Inventory oauth2-proxy versions and identify instances before v7.15.2.
Check whether --reverse-proxy is enabled.
Review all --skip-auth-regex and --skip-auth-route rules.
Confirm edge proxies strip or overwrite X-Forwarded-Uri.
Verify oauth2-proxy is reachable only through trusted reverse proxies.
Review access logs for unexpected X-Forwarded-Uri use.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · low confidence lookup
CWE-290: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
The CVE wording references authentication or credential exposure, so valid-account and credential-access review may help. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
2CVSS vectors
5Timeline events
2ADP providers
5Source links
SSVC decision data
CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: noneAutomatable: yesTechnical Impact: total
CVSS vector scores
2 official scores
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-290 · source CWE mapping
Authentication Bypass by Spoofing
Authentication Bypass by Spoofing represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.