BIMI and DMARC Can't Save You: The Overlooked DKIM Exploit
A vulnerability in the DKIM email authentication standard allows attackers to modify signed emails without invalidating the signature, by exploiting the optional body length tag and unsigned Content-Type headers. Attackers can forge emails that pass DKIM and DMARC checks, potentially displaying brand logos via BIMI, making phishing more convincing.
zone.eu
Published on zone.eu
This is not an issue in a particular software product but rather a vulnerability resulting from loose interpretations of the standard across numerous implementations that span the vast e-mail ecosystem.
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 write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the DKIM standard's optional body length tag allows signing only part of the message, and many implementations do not sign the Content-Type header or handle duplicate headers consistently, enabling attackers to alter the displayed content without breaking the signature.
Impact
Attackers could send forged emails that pass DKIM and DMARC and may display BIMI logos, increasing the risk of phishing and credential theft; Google has implemented mitigations, but the issue may persist elsewhere.
What the attacker needed
Sender uses DKIM with body length tag; Content-Type header not signed or duplicate handling flawed; victim uses an email client that displays appended content
The fix
Email senders should avoid using the body length tag, sign the Content-Type header twice, rotate DKIM keys, and assessors should ignore signatures with the length tag or weak algorithms.
How it was found
- Find an email signed with DKIM that uses the body length tag and does not sign the Content-Type header.
- Modify the boundary value in the Content-Type header.
- Append a new MIME structure using the modified boundary at the end of the email.
- Send the modified email to the victim; the email client displays the appended content as the real message.
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 write-up has not been written yet. The Original tab links to the source.
DKIM is a way for email senders to digitally sign messages so receivers can verify they are genuine. This report shows that if a sender uses an optional length limit in the signature, an attacker can append extra content that the email client displays instead of the original, while the signature still checks out. This means fake emails can appear legitimate, even with brand logos.
What is Crypto?
Encryption, signatures, randomness or certificate checks that do not protect what they claim to.