SMTP Injection is a web application vulnerability where an attacker injects malicious SMTP commands into email-related input fields (like contact forms, password reset forms, or feedback forms).
This can allow attackers to send spam emails, spoof emails, or even use your mail server for attacks
📌 What is SMTP Injection?
SMTP Injection occurs when:
User input is directly passed into email headers
Input is not properly validated or sanitized
The application constructs SMTP commands using user-controlled data
Attackers exploit this to manipulate email headers such as:
To
From
CC
BCC
Subject
⚠️ Impact of SMTP Injection
✅ Send spam emails
✅ Email spoofing
✅ Phishing attacks
✅ Abuse of mail server
✅ Domain reputation damage
✅ Blacklisting of SMTP server
🧠 How SMTP Injection Works (Simple Flow)
Website has a contact form
User enters email/message
Backend sends email using SMTP
Input is not sanitized
Attacker injects extra SMTP headers
Server sends malicious emails
🧠 Final Thoughts
SMTP Injection is often ignored, but it can:
Destroy brand trust
Lead to phishing attacks
Get your domain blacklisted
👉 Always sanitize input & use secure mail libraries