Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconCraft OAuth authorization URL with attacker-controlled redirect_uri
-
DeliveryDeliver phishing link to target user
-
ExploitTarget authenticates via legitimate Stalwart login
-
InstallServer forwards authorization code to attacker endpoint
-
C2Attacker submits code to token endpoint with matching redirect_uri
-
ExecuteObtain access and refresh tokens
-
ImpactFull mailbox read and write access
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V3 - Web Frontend Security Redirect URL validation
MITRE ATT&CK
1 technique across 1 tactic: Initial Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | The vulnerability is exploitable against any Stalwart Mail Server deployment where the OAuth client authentication requirement is disabled - specifically where client_auth_required is false, which is the default in shipped settings, meaning no administrator misconfiguration is required to be exposed. The attacker requires only network access to the OAuth authorization endpoint and the ability to deliver a crafted link to a target user. Exploitation is bounded by the requirement for active user interaction (UI:A): the target must follow the crafted link and complete authentication, ruling out fully automated mass exploitation. Deployments where client_auth_required has been explicitly set to true are not affected, as the validation bypass is gated entirely on that flag. No specific platform, version subrange beyond the general through-0.16.19 ceiling, or non-default feature enablement is required beyond the shipped defaults. |
| Impact | The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:A) confirms this is a remotely exploitable, low-complexity attack requiring no privileges but needing active user interaction - the victim must follow a crafted link and authenticate through the attacker's phishing flow. The impact metrics VC:H and VI:H reflect full email account compromise, including read access to all mail and the ability to manipulate account state via the obtained refresh token. No exploitation has been confirmed by CISA KEV, and EPSS data was absent from the available intelligence, leaving exploitation probability unquantified by those signals. The technical bar is nonetheless low: constructing a valid OAuth authorization request with an attacker-controlled redirect_uri requires no special tooling and is feasible for any competent threat actor conducting targeted credential-theft campaigns. The primary risk-reducing factor is UI:A - the victim must actively click the crafted link and complete authentication - which prevents fully automated mass exploitation but provides little protection against spear-phishing targeting high-value mailbox holders. The default-vulnerable configuration is the most operationally significant signal here: no administrator misconfiguration is required to be exposed, making this a realistic risk across all unpatched default deployments. |
| Exploit ScenarioDerived | An attacker targeting a specific Stalwart Mail Server user constructs an OAuth authorization request URL pointing to a legitimate Stalwart instance but specifying an attacker-controlled redirect_uri parameter. The attacker delivers this link via phishing email; the target follows it, is presented with a normal-looking Stalwart login page, and authenticates successfully - upon completion, the server forwards the authorization code to the attacker's endpoint. The attacker immediately presents this code alongside the same redirect_uri to the Stalwart token endpoint and receives valid access and refresh tokens, granting persistent full read and write access to the victim's mailbox. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 26, 2026
OAuth authorization code hijacking in Stalwart Mail Server through v0.16.19 enables full email account takeover when a victim authenticates via a crafted phishing link. The validation routine for OAuth redirect URIs in the default shipped configuration - where client authentication is disabled - returns success immediately without comparing the supplied redirect_uri against any registered client destination, allowing any attacker-controlled URI to receive a valid authorization code. The CVSS 4.0 score of 8.5 with high confidentiality and integrity impact reflects the severity of resulting mailbox compromise; no public exploit code has been identified at time of analysis, though the vulnerability is fully described in a public GitHub issue with source-level detail.
RemediationAI
No specific patched version has been confirmed in available data at time of analysis; administrators should monitor the Stalwart release page at https://github.com/stalwartlabs/stalwart and issue #3205 at https://github.com/stalwartlabs/stalwart/issues/3205 for a fix release and upgrade immediately upon availability. As an immediate compensating control, administrators should explicitly enable the client_auth_required configuration flag in Stalwart's OAuth settings; this activates redirect URI validation against pre-registered clients and closes the bypass path entirely. The trade-off is that all OAuth clients must be pre-registered with credentials, which may require reconfiguring existing integrations or third-party applications relying on the open registration flow. Additionally, restricting access to the OAuth authorization endpoint at the reverse-proxy or network layer to known-good client origins provides defense-in-depth, though it may not be feasible in deployments where OAuth is offered to external or mobile clients. Refer to the VulnCheck advisory at https://www.vulncheck.com/advisories/stalwart-mail-server-through-0.16.19-authorization-code-disclosure-via-unvalidated-oauth-redirect-uri for the latest remediation guidance.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Stalwart Mail Server (CPE: cpe:2.3:a:stalwartlabs:stalwart:*:*:*:*:*:*:*:*) is an open-source, all-in-one mail server supporting IMAP, JMAP, SMTP, and OAuth 2.0 for authentication delegation. The vulnerable component is the OAuth client registration and redirect URI validation handler located at crates/http/src/auth/oauth/registration.rs. CWE-601 (URL Redirection to Untrusted Site / Open Redirect) characterizes the root cause: the validation function short-circuits and returns success without performing any comparison of the caller-supplied redirect_uri against pre-registered client destinations, and this bypass is gated on the client_auth_required configuration flag being false - which is the default in shipped settings. The resulting behavior violates RFC 6749 Section 10.6, which mandates exact pre-registered redirect URI matching to prevent authorization code interception. Because the token endpoint validates only that the redirect_uri presented at exchange matches the one stored with the authorization code, an attacker who controls the redirect destination can complete the full OAuth code-for-token exchange unimpeded.
Know when Stalwart gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
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
Network-accessible OAuth endpoint needs no privileges; scope changes as attacker gains victim-account resources outside their own authority; victim must actively authenticate through the crafted link.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
Stalwart Mail Server does not compare an OAuth redirect target against any registered destination in its default configuration. The validation routine in crates/http/src/auth/oauth/registration.rs returns success immediately when the client-authentication requirement is disabled, and that requirement is false in the shipped settings, so the supplied redirect value is neither matched against a registered client nor otherwise constrained. The value is stored with the authorization code, and the login page reads it back and sends the browser to it with the code attached. A request naming a destination the attacker controls therefore delivers a valid authorization code there once the account holder authenticates, and because the token endpoint checks only that the redirect presented at exchange matches the one recorded with the code, the same party can exchange it for access and refresh tokens and read the account's mail.
Executive ViewAI
Stalwart Mail Server through version 0.16.19 contains an OAuth flaw enabling attackers to hijack user email accounts via phishing attacks without password compromise. An unauthenticated attacker can trick users into authenticating through a malicious link to capture valid authorization codes and gain complete mailbox access. Organizations using this mail server face full compromise of email confidentiality and integrity for affected accounts.
No vendor-released patch identified at time of analysis. Interim mitigations: enforce OAuth client authentication if configuration supports it, explicitly whitelist authorized redirect URIs and reject all others, restrict OAuth access to internal networks only, deploy enhanced phishing detection controls, and monitor authentication logs for unauthorized OAuth code redemption. Consider disabling OAuth entirely pending vendor patch availability.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
EUVD-2026-66612
GHSA-g6qf-h8rr-h574
NVD
CVE.org
EPSS
VulDB
Exploit-DB