Dovecot IMAP Server rfc822_parse_domain Information Leak Vulnerability
An out-of-bounds read vulnerability exists in Dovecot's RFC822 parser when parsing email addresses, triggered by a specially crafted email. An attacker could potentially leak sensitive information from the process or cause a denial of service.
Originally disclosed on Cisco Talos
An exploitable out of bounds read vulnerability exists in the RFC822 parser as implemented in Dovecot IMAP Server 2.2.33.2. A specially crafted email delivered over SMTP and passed on to Dovecot by MTA can trigger an out of bounds read resulting in potential sensitive information disclosure and denial of service.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the parser increments a pointer past the end of the buffer without checking, leading to an out-of-bounds read in functions like rfc822_skip_comment.
Impact
This could potentially leak sensitive information from the process or cause a denial of service, though the information leak is partially mitigated because the vulnerable code runs in a low-privileged process.
What the attacker needed
Ability to send email to the server; authenticated IMAP user to trigger leak
How it was found
- Send an email with a specially crafted From header containing an @ followed by an opening parenthesis and a short string.
- The email is delivered to the mailbox and parsed by Dovecot.
- The parser calls rfc822_parse_domain, which increments the pointer past the end of the buffer.
- The out-of-bounds read occurs in rfc822_skip_comment, potentially leaking memory or crashing.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
This bug is like reading past the end of a book: the program tries to read memory beyond the buffer it was given. An attacker can send a crafted email that makes the server read extra memory, which might contain secrets or crash the server.
What is Memory corruption?
Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.