CVE-2026-40017·Dovecot vulnerability
An attacker that can send mail to a user can craft a message header whose values are chosen to collide in an internal hash table, which makes the IMAP THREAD command consume CPU disproportionate to the size of the message. This is a separate issue from CVE-2026-40014 and is not addressed by that fix. Whenever a mail client issues a THREAD command on the affected mailbox, this can cause degradation or denial of service for IMAP. Monitor system for abnormal CPU usage, kill the offending process and remove the offending message from the affected mailbox. 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.33% — higher than 25% 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-40017 scores 8.5 on CVSS, so a successful attack would be serious — but at 0.33%, 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 are vulnerable to a hash collision attack in the IMAP THREAD command that causes excessive CPU consumption. Upgrade your Dovecot installation to version 1:2.4.1+dfsg1-6+deb13u7 or later, and monitor your mail server for any messages with specially crafted headers that trigger the vulnerability. After patching, audit your mailbox logs for unusual THREAD command activity and consider removing any malicious messages identified during forensic investigation.
sudo dnf check-update dovecot && sudo dnf update dovecotDefensia detects this vulnerability
How to check if you are affected
- Run `dovecot --version` to check the currently installed Dovecot version and confirm if it is older than 1:2.4.1+dfsg1-6+deb13u7
- Verify IMAP service is running and accessible: `sudo systemctl status dovecot` and check that IMAP ports (143, 993) are listening with `sudo ss -tlnp | grep dovecot`
- Search Dovecot logs for THREAD command execution: `grep -i 'THREAD' /var/log/dovecot/dovecot.log | grep -i 'command\|imap'` to identify mailboxes receiving THREAD requests
- After applying patches, re-run `dovecot --version` and cross-reference the output against the fixed version number to confirm successful remediation
FAQ
What is CVE-2026-40017?
CVE-2026-40017 is a denial-of-service vulnerability in Dovecot where an attacker sends an email with maliciously crafted headers designed to cause hash table collisions. When an IMAP client executes the THREAD command on a mailbox containing this message, the server experiences disproportionate CPU consumption, potentially degrading or disrupting IMAP service availability.
Is CVE-2026-40017 being actively exploited?
No, CVE-2026-40017 is not listed on the CISA Known Exploited Vulnerabilities (KEV) catalog and there are no publicly available exploits. However, the low barrier to entry (simply sending a crafted email) means organizations should still prioritize patching.
What versions of Dovecot are affected by CVE-2026-40017?
All Dovecot versions prior to 1:2.4.1+dfsg1-6+deb13u7 are vulnerable. This includes stable releases across Debian 13 and derived distributions.
How do I check if my server is vulnerable to CVE-2026-40017?
Run `dovecot --version` and compare the output to 1:2.4.1+dfsg1-6+deb13u7. If your version is lower, your system is vulnerable. For package-based systems, use `apt show dovecot-core | grep Version` (Debian/Ubuntu) or `dnf info dovecot | grep Version` (RHEL/CentOS).
Does Defensia detect CVE-2026-40017?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Dovecot is installed on a monitored server, CVE-2026-40017 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-40017. Free for 1 server.
Get started free