CVE-2026-81036: Stalwart Mail Server through 0.16.19 Authorization Code Disclosure via Unvalidated OAuth redirect_uri

Published Aug 26, 2026
·
Updated

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.

Affected Software

1 affected component
Stalwart Labs Stalwart Mail Server<=0.16.19

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade Stalwart Mail Server to a version that resolves this vulnerability.

    Fixed in 0.16.19
  2. Configuration

    Enable the client-authentication requirement so the OAuth redirect_uri is validated against a registered client; this prevents authorization codes from being disclosed to an unvalidated redirect target.

    Stalwart Mail Server OAuth registration/authorization code flow client-authentication requirement = true

Event History

Aug 26, 2026
CVE Published
via MITRE·03:45 PM
Data Sourced
via MITRE·03:45 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·04:16 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Are installations using the shipped settings affected?

Yes. The shipped settings disable the client-authentication requirement, which causes redirect URI validation to succeed without checking the supplied destination against a registered client.

2

What does an attacker need to exploit this?

The attacker needs to send a victim through an OAuth authorization flow using a redirect URI under the attacker’s control and have the account holder authenticate. No attacker privileges are required, but victim interaction is required.

3

What can an attacker obtain after a successful attack?

The attacker can receive the authorization code at their chosen redirect destination, then exchange it using the same redirect URI for access and refresh tokens. The provided data states that these tokens can be used to read the victim’s mail.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203