CVE-2026-40205·Dovecot vulnerability
An attacker that holds an OAuth2 token granting only part of the required scopes can authenticate, because when more than one scope is required in the configuration, the remote token validation paths accept a token that carries only one of them, while the local token validation path correctly requires all of them. The configured authorization policy is not enforced, so a token that was granted only part of the required permissions is accepted where it should have been rejected. Use local token validation where tokens can be validated locally. Update to non-vulnerable version. No publicly available exploits are known.
- Severity
- high
- Software
- Dovecot
- Fixed in
- 1:2.4.1+dfsg1-6+deb13u7
- Published
How likely is exploitation
FIRST's Exploit Prediction Scoring System puts the probability of this CVE being exploited in the next 30 days at 0.21% — higher than 10% of all published CVEs. EPSS is an independent forecast of exploitation, not a severity rating: it says nothing about how much damage a successful attack does, which is what a CVSS score measures.
Read the two together. CVE-2026-40205 scores 8 on CVSS, so a successful attack would be serious — but at 0.21%, almost nobody is currently attempting it. That is a different situation from a flaw under mass exploitation, and it is usually the difference between patching on your next maintenance window and patching tonight.
Affected versions
Until: 1:2.4.1+dfsg1-6+deb13u7
Fixed in: 1:2.4.1+dfsg1-6+deb13u7
How to fix this CVE
Dovecot versions prior to 1:2.4.1+dfsg1-6+deb13u7 contain a scope validation bypass in OAuth2 token handling that allows attackers with partial token permissions to authenticate as if they held full authorization. Update Dovecot immediately to version 1:2.4.1+dfsg1-6+deb13u7 or later, and prioritize deploying local token validation where possible rather than relying on remote validation endpoints. Review all OAuth2 authentication policies in your Dovecot configuration to ensure scope requirements are properly enforced.
sudo dnf update dovecotDefensia detects this vulnerability
How to check if you are affected
- Check installed Dovecot version: dovecot --version
- Verify OAuth2 configuration is active: grep -r 'oauth2' /etc/dovecot/conf.d/ | grep -v '^#'
- Search mail logs for OAuth2 authentication attempts: sudo grep -i 'oauth2\|scope' /var/log/mail.log* | grep -i 'auth\|failed\|denied'
- Confirm patch installation: dpkg -l | grep dovecot && dovecot --version | grep -E '2\.4\.1.*deb13u7'
FAQ
What is CVE-2026-40205?
This is a scope validation bypass in Dovecot's OAuth2 authentication handler. When multiple OAuth2 scopes are required by policy, the remote token validation path incorrectly accepts tokens with only partial scope coverage instead of enforcing all required scopes, bypassing the configured authorization policy.
Is CVE-2026-40205 being actively exploited?
No, CVE-2026-40205 is not currently tracked as actively exploited by CISA, and no public exploit code has been released as of this advisory.
What versions of Dovecot are affected by CVE-2026-40205?
All Dovecot versions up to and including 1:2.4.1+dfsg1-6+deb13u6 are vulnerable. The fix is available in version 1:2.4.1+dfsg1-6+deb13u7 and later.
How do I check if my server is vulnerable to CVE-2026-40205?
Run 'dovecot --version' and compare the output to 1:2.4.1+dfsg1-6+deb13u7. If your version is older and contains 'oauth2' in your Dovecot configuration (check /etc/dovecot/conf.d/), your server is vulnerable.
Does Defensia detect CVE-2026-40205?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Dovecot is installed on a monitored server, CVE-2026-40205 will appear in your dashboard with remediation steps.
Related Dovecot CVEs
References
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2026-40205. Free for 1 server.
Get started free