---
id: CVE-2026-81036
title: >-
  Stalwart Mail Server does not compare an OAuth redirect target against any
  registered destination in its default configuration
summary: >-
  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 cli…
severity: high
cvss: 8.1
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N'
cwe:
  - CWE-601
published: '2026-08-26'
updated: '2026-08-29'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-81036'
references:
  - url: 'https://github.com/stalwartlabs/stalwart'
    label: disclosure@vulncheck.com
  - url: >-
      https://github.com/stalwartlabs/stalwart/blob/v0.16.19/crates/http/src/auth/oauth/registration.rs
    label: disclosure@vulncheck.com
  - url: 'https://github.com/stalwartlabs/stalwart/issues/3205'
    label: disclosure@vulncheck.com
  - url: >-
      https://www.vulncheck.com/advisories/stalwart-mail-server-through-0.16.19-authorization-code-disclosure-via-unvalidated-oauth-redirect-uri
    label: disclosure@vulncheck.com
  - url: 'https://github.com/stalwartlabs/stalwart/issues/3205'
    label: 134c704f-9b21-4f2e-91b3-4a467353bcc0
tags:
  - nvd
epss: 0.00308
epssPercentile: 0.23721
ingestedAt: '2026-08-29T21:42:34.751Z'
---

## Overview

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.

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
