CVE-2026-42007·Dovecot vulnerability
An attacker that has valid credentials can use a Sieve script with the editheader extension to trigger a use-after-free in the mail editing code, and to write memory contents beyond the intended buffer into the delivered mail. This causes memory leak and opportunity to do memory corruption during mail delivery, which can crash the delivery process and may allow execution of arbitrary code in the context of that process. Disable the Sieve editheader extension. 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.35% — higher than 26% 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-42007 scores 8 on CVSS, so a successful attack would be serious — but at 0.35%, 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
Organizations running Dovecot must immediately update to version 1:2.4.1+dfsg1-6+deb13u7 or later to patch a critical use-after-free vulnerability in the Sieve editheader extension that can lead to memory corruption and potential code execution during mail delivery. If immediate patching is not possible, disable the Sieve editheader extension in your Dovecot configuration to eliminate the attack vector. This vulnerability requires valid authentication credentials, making it a risk primarily for environments with compromised or malicious user accounts.
sudo dnf update -y dovecotDefensia detects this vulnerability
How to check if you are affected
- Step 1: Check the installed Dovecot version by running: dovecot --version
- Step 2: Verify if Sieve editheader extension is enabled by checking /etc/dovecot/conf.d/90-sieve.conf for the line 'sieve_extensions = +editheader' or similar configuration
- Step 3: Search mail delivery logs for use-after-free crashes or segmentation faults: grep -i 'segfault\|use-after-free' /var/log/mail.log /var/log/dovecot/deliver.log
- Step 4: After patching, confirm the version with dovecot --version and verify it shows 1:2.4.1+dfsg1-6+deb13u7 or later
FAQ
What is CVE-2026-42007?
CVE-2026-42007 is a use-after-free vulnerability in Dovecot's Sieve mail filtering engine that occurs when the editheader extension processes specially crafted scripts, allowing authenticated attackers to corrupt memory and potentially execute arbitrary code in the mail delivery process.
Is CVE-2026-42007 being actively exploited?
No, CVE-2026-42007 is not currently listed on the CISA Known Exploited Vulnerabilities catalog, and no public exploits have been disclosed.
What versions of Dovecot are affected by CVE-2026-42007?
All versions of Dovecot prior to 1:2.4.1+dfsg1-6+deb13u7 are affected. The vulnerability is patched in version 1:2.4.1+dfsg1-6+deb13u7 and later.
How do I check if my server is vulnerable to CVE-2026-42007?
Run 'dovecot --version' and compare the output to 1:2.4.1+dfsg1-6+deb13u7. If your version is older and the Sieve editheader extension is enabled (check /etc/dovecot/conf.d/90-sieve.conf), your server is vulnerable.
Does Defensia detect CVE-2026-42007?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Dovecot is installed on a monitored server, CVE-2026-42007 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-42007. Free for 1 server.
Get started free