Description
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.
Published: 2026-08-26
Score: 8.5 High
EPSS: < 1% Very Low
KEV: No
Impact: Authorization code disclosure leading to unauthorized mail access
Action: Patch Immediately
AI Analysis

Impact

Stalwart Mail Server fails to validate OAuth redirect_uri values, an instance of CWE‑601. In the shipped default configuration client‑authentication is disabled, causing the validation logic to accept any supplied redirect_uri outright. The redirect_uri is stored alongside the authorization code, and the login page redirects the browser to it after the user authenticates. An attacker can supply a redirect_uri pointing to a domain they control, receive a valid authorization code once the victim logs in, and then exchange that code for access and refresh tokens. These tokens grant read access to the victim’s mailbox, exposing confidential email content.

Affected Systems

Stalwart Mail Server, version 0.16.19, delivered by stalwartlabs. The vulnerability stems from the default configuration of this version and applies to any deployment that has not enabled client authentication or otherwise configured redirect_uri validation.

Risk and Exploitability

The CVSS score of 8.5 indicates a high‑severity flaw. The EPSS score is not available, so the probability of exploitation cannot be quantified precisely, but the vulnerability is not listed in the CISA KEV catalog. The likely attack vector is remote over the OAuth flow; the attacker merely needs to craft an OAuth request with a chosen redirect_uri, obtain an authorization code after the user logs in, and use the token endpoint to receive credentials that grant read access to the victim’s mailbox. No prior privileged access or additional vulnerability is required, making the exploitation realistic and potentially rapid.

Generated by OpenCVE AI on August 26, 2026 at 19:09 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Apply the official patch that enforces redirect_uri validation in Stalwart Mail Server.
  • Until the patch is applied, disable OAuth entirely or enable the client‑authentication requirement to prevent unvalidated redirect URIs.
  • Restrict the redirect_uri to a whitelist of known domains and update the configuration accordingly.
  • Upgrade to a later stable release that contains the fix if available.

Generated by OpenCVE AI on August 26, 2026 at 19:09 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Sat, 29 Aug 2026 03:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Wed, 26 Aug 2026 20:45:00 +0000

Type Values Removed Values Added
First Time appeared Stalwartlabs
Stalwartlabs stalwart
Vendors & Products Stalwartlabs
Stalwartlabs stalwart

Wed, 26 Aug 2026 16:00:00 +0000

Type Values Removed Values Added
Description 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.
Title Stalwart Mail Server through 0.16.19 Authorization Code Disclosure via Unvalidated OAuth redirect_uri
Weaknesses CWE-601
References
Metrics cvssV3_1

{'score': 8.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N'}

cvssV4_0

{'score': 8.5, 'vector': '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'}


Subscriptions

Stalwartlabs Stalwart
cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-08-29T02:45:24.847Z

Reserved: 2026-08-26T15:23:08.164Z

Link: CVE-2026-81036

cve-icon Vulnrichment

Updated: 2026-08-29T02:45:18.806Z

cve-icon NVD

Status : Received

Published: 2026-08-26T16:16:46.607

Modified: 2026-08-29T03:17:12.040

Link: CVE-2026-81036

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-26T20:30:11Z

Weaknesses
  • CWE-601

    URL Redirection to Untrusted Site ('Open Redirect')