CVE-2025-30189: 
Dovecot vulnerability analysis and mitigation

Overview

CVE-2025-30189 is an authentication cache misconfiguration vulnerability in Dovecot IMAP Server that causes incorrect user session data to be served from cache, effectively allowing subsequent logins to authenticate as the first cached user. It affects Dovecot versions 2.4.0 and 2.4.1, and was fixed in version 2.4.2. The vulnerability was reported by researcher "Erik" and disclosed on October 29, 2025, with the CVE published on October 31, 2025. It carries a CVSS v3.1 base score of 7.4 (High) (Openwall OSS-Sec, Red Hat CVE).

Technical details

The root cause is classified as CWE-1250 (Improper Preservation of Consistency Between Independent Representations of Shared State). When authentication caching is enabled with the oauth2 passdb, passwd passdb or userdb, or passwd userdb drivers, the cache key %u no longer expands to the same value as %{user}, causing all users sharing the same cache key to receive the cached credentials of the first authenticated user. This means that after the first successful login, all subsequent login attempts — regardless of the actual credentials provided — are resolved against the cached entry of the initial user. The vulnerability is network-exploitable with high attack complexity and requires no privileges or user interaction (Openwall OSS-Sec).

Impact

Successful exploitation results in unauthorized access to other users' email accounts and data, representing a high confidentiality and integrity impact. An attacker who logs in after a legitimate user could gain full access to that user's mailbox, send emails on their behalf, or modify stored messages. The vulnerability has no availability impact but poses significant risk in multi-tenant or shared mail server environments where many users authenticate through the same Dovecot instance (Openwall OSS-Sec, Red Hat CVE).

Exploitability

No publicly available exploits are known for CVE-2025-30189, and it has not been observed being exploited in the wild (Openwall OSS-Sec). The EPSS score is approximately 0.031%, indicating a low probability of exploitation in the near term. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. Exploitation requires high attack complexity, as the attacker must time their login to occur after a legitimate user has populated the cache with their credentials.

Exploitation steps

  1. Identify a vulnerable target: Locate a Dovecot IMAP server running version 2.4.0 or 2.4.1 with authentication caching enabled and using oauth2 passdb, passwd passdb/userdb, or passwd userdb drivers.
  2. Wait for a legitimate user to authenticate: The cache must first be populated by a legitimate user's login. The attacker monitors or waits for a target user to authenticate, which stores their credentials in the auth cache under the shared cache key %u.
  3. Attempt login with any credentials: The attacker connects to the IMAP server and submits a login request. Due to the cache key collision bug, the server resolves the request against the cached entry of the previously authenticated user rather than validating the attacker's actual credentials.
  4. Gain unauthorized access: The attacker is granted access to the cached user's mailbox, allowing them to read, modify, or delete emails and potentially pivot to other services using the compromised account (Openwall OSS-Sec).

Indicators of compromise

  • Logs: Dovecot authentication logs showing multiple different usernames resolving to the same effective user session; auth log entries where the authenticated user differs from the login username provided.
  • Logs: Unusual IMAP login patterns where users appear to access mailboxes that do not match their provided credentials in dovecot.log or /var/log/mail.log.
  • Network: Multiple IMAP connections from different source IPs all resulting in access to the same mailbox account.
  • Process/Config: Dovecot configuration with auth_cache_size set to a non-zero value combined with oauth2, passwd, or passwd-file passdb/userdb drivers — indicating a vulnerable configuration (Openwall OSS-Sec).

Mitigation and workarounds

The vulnerability is fixed in Dovecot version 2.4.2. Administrators should upgrade to 2.4.2 or later as the primary remediation. The official patch is available at the Dovecot core repository comparing commits a70ce7d3e2f983979e971414c5892c4e30197231 through 34caed79b76a7b82a2a9c94cf35371bec6c2b826. As an immediate workaround, disabling the authentication cache globally (setting auth_cache_size = 0) or disabling it specifically for the affected passdb/userdb drivers will prevent exploitation. Fedora, SUSE, and other Linux distributions have released updated packages incorporating the fix (Openwall OSS-Sec, Red Hat CVE).

Community reactions

The vulnerability was disclosed by Aki Tuomi of the Dovecot team via the Dovecot-news mailing list and cross-posted to the oss-security list, following responsible disclosure from researcher "Erik" who reported the issue on July 25, 2025 (Openwall OSS-Sec). Security community members on Mastodon and Bluesky noted the disclosure, and a technical write-up was published by Hendry Adrian covering the auth cache access control flaw. Linux security outlets including Linuxiac, Pro-Linux, and LinuxSecurity covered the Dovecot 2.4.2 release and associated security fixes. The vulnerability received moderate attention given its limited scope to Dovecot 2.4.x versions.

Additional resources

Linux Distribution fix status

Fix availability across major Linux distributions and their releases.

Debian

Fixed

bookworm

dovecot

Fixed

sid

dovecot: 1:2.4.1+dfsg1-7

Fixed

trixie

dovecot: 1:2.4.1+dfsg1-6+deb13u1

Fixed

Alpine

Fixed

edge

dovecot: 2.4.2-r0

Fixed

v3.23

dovecot: 2.4.2-r0

Fixed

Source: This report was generated using AI

Related Dovecot vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-73208HIGH7.4
  • Dovecot logoDovecot
  • dovecot23-devel
NoYesAug 28, 2026
CVE-2026-73209MEDIUM6.5
  • Dovecot logoDovecot
  • dovecot23-backend-pgsql
NoYesAug 28, 2026
CVE-2026-52687MEDIUM6.5
  • Dovecot logoDovecot
  • dovecot24-backend-mysql
NoYesAug 28, 2026
CVE-2026-52681LOW3.1
  • Dovecot logoDovecot
  • dovecot23-backend-sqlite
NoYesAug 28, 2026
CVE-2026-42394NONEN/A
  • Dovecot logoDovecot
  • dovecot
NoYesSep 25, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management