CVE-2026-34457: Github.com/oauth2 proxy/oauth2 proxy/v7 OAuth2 Proxy's Health Check User-Agent Vulnerability

CRITICAL
Advisory Identifier: GHSA-5hvv-m4w4-gf6v
CVSS 9.1
CWE-290
Published
Advisory Summary

CVE-2026-34457 is a CRITICAL (CVSS 9.1) oauth2 proxy's health check user-agent vulnerability (CWE-290: Authentication Bypass by Spoofing) affecting Github.com/oauth2 proxy/oauth2 proxy/v7 libraries in the Go ecosystem. The issue involves oauth2 proxy's health check user-agent matching bypasses authentication in auth_request mode. Remediation is available by upgrading affected packages to version 7.15.2.

CVE-2026-34457 at a Glance

CVE Identifier CVE-2026-34457
GHSA Identifier GHSA-5hvv-m4w4-gf6v
Severity CRITICAL
CVSS v3.1 Base Score 9.1
CWE Classification CWE-290: Authentication Bypass by Spoofing
Affected Product Github.com/oauth2 proxy/oauth2 proxy/v7
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 9.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2026-34457

To remediate this vulnerability, upgrade all affected Github.com/oauth2 proxy/oauth2 proxy/v7 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/oauth2-proxy/oauth2-proxy/v7 fixed: 7.15.2
Upgrade github.com/oauth2-proxy/oauth2-proxy/v7 to 7.15.2
github.com/oauth2-proxy/oauth2-proxy fixed: Latest secure release
Upgrade github.com/oauth2-proxy/oauth2-proxy to Latest secure release
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/oauth2-proxy/oauth2-proxy/v7

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-34457, inspect your project dependencies for Github.com/oauth2 proxy/oauth2 proxy/v7:

inspect dependencies for github.com/oauth2-proxy/oauth2-proxy/v7

Analyze the terminal output to locate any version of Github.com/oauth2 proxy/oauth2 proxy/v7 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 7.15.2), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-290: Authentication Bypass by Spoofing, where this attack-focused weakness is caused by incorrectly implemented authentication schemes that are subject to spoofing attacks. In Github.com/oauth2 proxy/oauth2 proxy/v7, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact A configuration-dependent authentication bypass exists in OAuth2 Proxy. Deployments are affected when all of the following are true: - OAuth2 Proxy is used with an `auth_request`-style integration (for example, nginx `auth_request`) - `--ping-user-agent` is set or `--gcp-healthchecks` is enabled In affected configurations, OAuth2 Proxy will treat a request with the configured health check `User-Agent` value as a successful health check regardless of the requested path. This allows an unauthenticated remote attacker to bypass authentication and access protected upstream resources without completing the normal login flow. This issue does not affect deployments that do not use `auth_request`-style subrequests, or that do not enable `--ping-user-agent`/`--gcp-healthchecks`. ### Patches Users should upgrade to `v7.15.2` or later once available. Deployments running versions prior to `v7.15.2` should be considered affected if they use `auth_request`-style authentication together with `--ping-user-agent` or `--gcp-healthchecks`. ### Workarounds Users can mitigate this issue by: - disabling `--gcp-healthchecks` - removing any configured `--ping-user-agent` - ensuring the reverse proxy does not forward client-controlled `User-Agent` headers to the OAuth2 Proxy auth subrequest - using path-based health checks only, on dedicated health check endpoints Example nginx mitigation for the auth subrequest: ```nginx location = /oauth2/auth { internal; proxy_pass http://127.0.0.1:4180; proxy_pass_request_body off; proxy_set_header Content-Length ""; proxy_set_header Host $host; # set to value that isn't the same as your configured PingUserAgent or GCPs "GoogleHC/1.0" proxy_set_header User-Agent "oauth2-proxy-auth-request"; } ```

CVE-2026-34457 Affected Github.com/oauth2 proxy/oauth2 proxy/v7 Versions

2 component(s)
Fixed Versions:
7.15.2
Product / Package Ecosystem Affected Versions Fixed Version
github.com/oauth2-proxy/oauth2-proxy/v7
Go
< 7.15.2
7.15.2
github.com/oauth2-proxy/oauth2-proxy
Go
≤ 3.2.0

References

Frequently Asked Questions

What is CVE-2026-34457?
CVE-2026-34457 is a security vulnerability in Github.com/oauth2 proxy/oauth2 proxy/v7 involving OAuth2 Proxy's Health Check User-Agent Matching Bypasses Authentication in auth_request Mode under CWE-290: Authentication Bypass by Spoofing.
Which Github.com/oauth2 proxy/oauth2 proxy/v7 versions are affected?
Affected versions include releases prior to 7.15.2 across affected packages: github.com/oauth2-proxy/oauth2-proxy/v7, github.com/oauth2-proxy/oauth2-proxy.
What version fixes CVE-2026-34457?
Upgrading to 7.15.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/oauth2-proxy/oauth2-proxy/v7 affected?
Yes, github.com/oauth2-proxy/oauth2-proxy/v7 is affected in releases prior to 7.15.2. Upgrade your dependency to 7.15.2 or later.
Is github.com/oauth2-proxy/oauth2-proxy affected?
Yes, github.com/oauth2-proxy/oauth2-proxy is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2026-34457?
CVE-2026-34457 has a CVSS v3.1 base score of 9.1 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N.
What CWE is associated with CVE-2026-34457?
CVE-2026-34457 is classified under CWE-290: Authentication Bypass by Spoofing (This attack-focused weakness is caused by incorrectly implemented authentication schemes that are subject to spoofing attacks.).
How can I check Go dependencies for CVE-2026-34457?
Run the dependency tree command: 'inspect dependencies for github.com/oauth2-proxy/oauth2-proxy/v7'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-5hvv-m4w4-gf6v",
  "modified" : "2026-04-15T21:06:37Z",
  "published" : "2026-04-14T22:31:19Z",
  "aliases" : [ "CVE-2026-34457" ],
  "summary" : " OAuth2 Proxy's Health Check User-Agent Matching Bypasses Authentication in auth_request Mode",
  "details" : "### Impact\nA configuration-dependent authentication bypass exists in OAuth2 Proxy.\n\nDeployments are affected when all of the following are true:\n\n- OAuth2 Proxy is used with an `auth_request`-style integration   (for example, nginx `auth_request`)\n- `--ping-user-agent` is set or `--gcp-healthchecks` is enabled\n\nIn affected configurations, OAuth2 Proxy will treat a request with the configured health check `User-Agent` value as a successful health check regardless of the requested path. This allows an unauthenticated remote attacker to bypass authentication and access protected upstream resources without completing the normal login flow.\n\nThis issue does not affect deployments that do not use `auth_request`-style subrequests, or that do not enable  `--ping-user-agent`/`--gcp-healthchecks`.\n\n### Patches\nUsers should upgrade to `v7.15.2` or later once available. Deployments running versions prior to `v7.15.2` should be considered affected if they use `auth_request`-style authentication together with `--ping-user-agent` or  `--gcp-healthchecks`.\n\n### Workarounds\nUsers can mitigate this issue by:\n\n- disabling `--gcp-healthchecks`\n- removing any configured `--ping-user-agent`\n- ensuring the reverse proxy does not forward client-controlled `User-Agent`  headers to the OAuth2 Proxy auth subrequest\n- using path-based health checks only, on dedicated health check endpoints\n\nExample nginx mitigation for the auth subrequest:\n\n```nginx\nlocation = /oauth2/auth {\n    internal;\n    proxy_pass http://127.0.0.1:4180;\n    proxy_pass_request_body off;\n    proxy_set_header Content-Length \"\";\n    proxy_set_header Host $host;\n    # set to value that isn't the same as your configured PingUserAgent or GCPs \"GoogleHC/1.0\"\n    proxy_set_header User-Agent \"oauth2-proxy-auth-request\";\n}\n```",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/oauth2-proxy/oauth2-proxy/v7"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "7.15.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/oauth2-proxy/oauth2-proxy"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "3.2.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/oauth2-proxy/oauth2-proxy/security/advisories/GHSA-5hvv-m4w4-gf6v"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-34457"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/oauth2-proxy/oauth2-proxy"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/oauth2-proxy/oauth2-proxy/releases/tag/v7.15.2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-290" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-04-14T22:31:19Z",
    "nvd_published_at" : "2026-04-14T23:16:28Z"
  }
}