CVE-2026-40574: Github.com/oauth2 proxy/oauth2 proxy/v7 OAuth2 Proxy Has An Authorization Vulnerability

MODERATE
Advisory Identifier: GHSA-c5c4-8r6x-56w3
CVSS 6.8
CWE-863
Published
Advisory Summary

CVE-2026-40574 is a MODERATE (CVSS 6.8) oauth2 proxy has an authorization vulnerability (CWE-863: Incorrect Authorization) affecting Github.com/oauth2 proxy/oauth2 proxy/v7 libraries in the Go ecosystem. The issue involves oauth2 proxy has an authorization bypass in email domain validation via malformed multi-@ email claims. Remediation is available by upgrading affected packages to version 7.15.2.

CVE-2026-40574 at a Glance

CVE Identifier CVE-2026-40574
GHSA Identifier GHSA-c5c4-8r6x-56w3
Severity MODERATE
CVSS v3.1 Base Score 6.8
CWE Classification CWE-863: Incorrect Authorization
Affected Product Github.com/oauth2 proxy/oauth2 proxy/v7
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 6.8

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

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required Low (PR:L)
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-40574

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
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-40574, 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-863: Incorrect Authorization, where the product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. 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 An authorization bypass exists in OAuth2 Proxy as part of the `email_domain` enforcement option. An attacker may be able to authenticate with an email claim such as `attacker@evil.com@company.com` and satisfy an allowed domain check for `company.com`, even though the claim is not a valid email address. The issue **ONLY** affects deployments that rely on `email_domain` restrictions and accept email claim values from identity providers or claim mappings that do not strictly enforce normal email syntax. The practical risk ONLY exists in self-hosted or custom OIDC environments and federated setups where unexpected claim values can reach oauth2-proxy. Standard hosted providers that enforce valid email formatting ARE NOT effected. ### Patches Users should upgrade to `v7.15.2` or later once available. ### Workarounds The most effective workaround is to ensure the configured identity provider cannot emit malformed or attacker-controlled email claim values.

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

1 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

References

Frequently Asked Questions

What is CVE-2026-40574?
CVE-2026-40574 is a security vulnerability in Github.com/oauth2 proxy/oauth2 proxy/v7 involving OAuth2 Proxy has an Authorization Bypass in Email Domain Validation via Malformed Multi-@ Email Claims under CWE-863: Incorrect Authorization.
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.
What version fixes CVE-2026-40574?
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.
What is the CVSS score of CVE-2026-40574?
CVE-2026-40574 has a CVSS v3.1 base score of 6.8 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N.
What CWE is associated with CVE-2026-40574?
CVE-2026-40574 is classified under CWE-863: Incorrect Authorization (The product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check.).
How can I check Go dependencies for CVE-2026-40574?
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-c5c4-8r6x-56w3",
  "modified" : "2026-07-21T13:56:41Z",
  "published" : "2026-04-15T19:23:54Z",
  "aliases" : [ "CVE-2026-40574" ],
  "summary" : "OAuth2 Proxy has an Authorization Bypass in Email Domain Validation via Malformed Multi-@ Email Claims",
  "details" : "### Impact\n\nAn authorization bypass exists in OAuth2 Proxy as part of the `email_domain` enforcement option. An attacker may be able to authenticate with an email claim such as `attacker@evil.com@company.com` and satisfy an allowed domain check for `company.com`, even though the claim is not a valid email address.\n\nThe issue **ONLY** affects deployments that rely on `email_domain` restrictions and accept email claim values from identity providers or claim mappings that do not strictly enforce normal email syntax. The practical risk ONLY exists in self-hosted or custom OIDC environments and federated setups where unexpected claim values can reach oauth2-proxy. Standard hosted providers that enforce valid email formatting ARE NOT effected.\n\n### Patches\nUsers should upgrade to `v7.15.2` or later once available.\n\n### Workarounds\nThe most effective workaround is to ensure the configured identity provider cannot emit malformed or attacker-controlled email claim values.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:L/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"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/oauth2-proxy/oauth2-proxy/security/advisories/GHSA-c5c4-8r6x-56w3"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-40574"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/oauth2-proxy/oauth2-proxy"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-863" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-04-15T19:23:54Z",
    "nvd_published_at" : "2026-04-21T17:16:55Z"
  }
}