1 Email Header Injection
When a web application builds email headers from user-supplied data (like a "From" or "Subject" field) without stripping newline characters, attackers can inject additional headers such as CC, BCC, or even a new message body.
Vulnerable PHP mailer:
$from = $_POST["email"];
$subject = $_POST["subject"];
mail("[email protected]", $subject, $message, "From: " . $from);An attacker submits email: [email protected]\r\nBcc: [email protected],[email protected]
The additional header injects BCC recipients, turning the server into a spam relay. Attackers can also inject Content-Type: text/html to change the message body format.