Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Unauthenticated network attack (PR:N/AV:N) but needs a victim click (UI:R); the stolen token grants identity takeover on downstream resources (S:C, C:H/I:H) with no availability impact.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
3DescriptionCVE.org
MaxKey through 4.1.12, fixed in commit ddbb72f, contains an insufficient redirect URI validation vulnerability in DefaultRedirectResolver.hostMatches() that allows remote attackers to hijack OAuth 2.0 authorization codes by supplying a crafted redirect_uri whose hostname suffix matches a registered URI without proper dot-boundary anchoring. Attackers who control a domain ending with the registered redirect URI hostname can social-engineer victims into clicking a crafted authorization URL, causing the authorization code to be issued to the attacker-controlled URI and exchanged for an access token granting access to the victim's identity.
AnalysisAI
OAuth 2.0 authorization-code theft in Dromara MaxKey through 4.1.12 lets remote attackers hijack a victim's authorization code and exchange it for an access token, taking over the victim's federated identity. The flaw lives in DefaultRedirectResolver.hostMatches(), where a naive endsWith() suffix comparison lets an attacker-controlled domain that ends with a registered redirect URI hostname pass validation. Publicly available exploit code exists and a vendor patch (commit ddbb72f) is available; no active exploitation has been confirmed (not in CISA KEV).
Technical ContextAI
MaxKey is an open-source enterprise Identity and Access Management (IAM)/single-sign-on server that implements OAuth 2.0 and OpenID Connect. The affected component is the OAuth authorization-code endpoint's redirect_uri validation in the maxkey-protocol-oauth-2.0 module's DefaultRedirectResolver. Per CWE-183 (Permissive List of Allowed Inputs), the root cause is that subdomain matching relied on Java String.endsWith(registered) with matchSubdomains defaulting to true, so a requested hostname was accepted whenever it merely ended with the registered hostname string, without anchoring on a dot ('.') boundary. This means 'attackerexample.com' satisfies a registered 'example.com', letting an unregistered attacker host masquerade as an approved redirect target. The patch (commit ddbb72fb24ab8e66aa422fb14b1177330bcffb45) removes the matchSubdomains flag and its endsWith() suffix branch entirely and drops 'implicit' from the accepted grant types. The affected package is identified by CPE cpe:2.3:a:dromara:maxkey.
RemediationAI
Upstream fix available (commit ddbb72f); a released, tagged patched version is not independently confirmed from the provided data, so upgrade MaxKey to a build that includes commit ddbb72fb24ab8e66aa422fb14b1177330bcffb45 (or apply that patch, which removes the permissive matchSubdomains/endsWith suffix matching and drops the implicit grant type). If you cannot upgrade immediately, the most effective compensating control is to register only exact, fully-qualified redirect URIs and avoid wildcard/subdomain matching, and - if configurable in your build - set matchSubdomains to false to disable suffix matching (side effect: legitimate clients relying on subdomain redirect matching will break and must be re-registered with explicit URIs). Additionally disable the implicit grant type if unused and restrict/monitor the authorization endpoint. Track details via the fix commit, the VulnCheck advisory (https://www.vulncheck.com/advisories/maxkey-defaultredirectresolver-oauth-authorization-code-theft), and GitHub issue #269.
Server-side request forgery (SSRF) in Dromara MaxKey up to 4.1.7 allows authenticated attackers to make internal network
SQL injection in Dromara MaxKey up to version 3.5.13 allows authenticated remote attackers to execute arbitrary SQL quer
Same weakness CWE-183 – Permissive List of Allowed Inputs
View allSame technique Information Disclosure
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-51148
GHSA-7957-wqgw-m3j9