CVE-2026-34457: Github.com/oauth2 proxy/oauth2 proxy/v7 OAuth2 Proxy's Health Check User-Agent Vulnerability
CRITICALCVE-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
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).
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.
Upgrade github.com/oauth2-proxy/oauth2-proxy/v7 to 7.15.2
Upgrade github.com/oauth2-proxy/oauth2-proxy to Latest secure release
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
CVE-2026-34457 Affected Github.com/oauth2 proxy/oauth2 proxy/v7 Versions
2 component(s)| 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?
Which Github.com/oauth2 proxy/oauth2 proxy/v7 versions are affected?
What version fixes CVE-2026-34457?
Is github.com/oauth2-proxy/oauth2-proxy/v7 affected?
Is github.com/oauth2-proxy/oauth2-proxy affected?
What is the CVSS score of CVE-2026-34457?
What CWE is associated with CVE-2026-34457?
How can I check Go dependencies for CVE-2026-34457?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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"
}
}