The short answer is no, DKIM on its own does not protect against replay attacks. While DKIM is a critical email authentication standard that verifies the sender's domain and ensures the message content hasn't been tampered with since it was signed, it has an inherent vulnerability. An attacker can capture a legitimate, DKIM-signed email and simply “replay” it by sending it to new recipients. Because the original signed parts of the email remain unchanged, the DKIM signature remains valid, and the message can bypass security filters.
This isn't just a theoretical problem. It's a technique actively used in sophisticated phishing campaigns. Understanding this weakness is the first step toward building a more resilient email security posture.
A DKIM replay attack is a simple but effective technique. As the name suggests, it involves an attacker intercepting a valid email that has been signed with DKIM and resending it. The attacker doesn't need to break the DKIM signature's cryptography or forge a new one. They just need to capture a real email, for example, a security notification or a password reset email from a trusted service.
They can then forward this email to new, unsuspecting targets. The attacker might change headers that are not part of the DKIM signature, such as the `To` or `CC` fields, to direct the replayed message to their victims. A notable real-world example involved attackers exploiting Google's infrastructure. They captured legitimate, DKIM-signed emails from Google and replayed them in a widespread phishing campaign. Because the emails carried a valid signature from google.com, they appeared highly credible to both email filters and end-users.
While DKIM itself is vulnerable, you are not powerless. You can implement several measures to mitigate the risk of your domain being used in a replay attack. A layered defense strategy is the most effective approach.
DKIM is a foundational pillar of modern email security, and you absolutely must have it correctly configured for your domains. However, it's essential to understand its limitations. It authenticates the sender and protects message integrity but does not, by itself, prevent a valid message from being maliciously reused.
By combining DKIM with best practices like regular key rotation, strategic header signing, and a strong DMARC policy, you can build a robust defense that significantly reduces the threat of your domain's reputation being hijacked by attackers.