email-header-injection

Detect email header injection and SPF/DKIM/DMARC bypass vulnerabilities in SMTP messages.

120|8|Updated Jun 2, 2026
One-click install
npx skills add https://github.com/Prohao42/aimy-skill --skill email-header-injection-prohao42
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: email-header-injection
Source: https://github.com/Prohao42/aimy-skill/tree/main/ai-mian/hack-skills/skills/email-header-injection
Command: npx skills add https://github.com/Prohao42/aimy-skill --skill email-header-injection-prohao42

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides expert-level email header injection and authentication bypass capabilities, specifically designed for SMTP messages. It helps uncover vulnerabilities in contact forms, email APIs, password reset flows, and other features that construct SMTP messages with user-controlled fields.

Core Features & Use Cases

  • Email Header Injection: Covers CRLF injection in headers, SPF/DKIM/DMARC bypass, and phishing amplification.
  • Attack Scenarios: Handles BCC injection, CC injection with header stacking, body injection, and reply-to manipulation for phishing.
  • Vulnerability Patterns: Includes PHP mail(), Python smtplib, and Node.js nodemailer examples.
  • SPF/DKIM/DMARC Bypass Techniques: Provides strategies to bypass SPF, DKIM, and DMARC for email spoofing.
  • Mail Client Rendering Attacks: Explores CSS-based data exfiltration, remote image tracking, and form action hijacking.
  • Testing Methodology: Offers a structured approach to testing email features and identifying vulnerabilities.

Quick Start

Use the email-header-injection skill to test for CRLF injection in the subject field of an email.

Frequently Asked Questions about email-header-injection

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How does CRLF injection work in SMTP header construction?

CRLF injection in SMTP headers exploits user-controlled input fields by inserting carriage return and line feed characters to manipulate email headers, enabling BCC injection, CC injection, and body injection to spoof emails or bypass authentication protocols.

How do I test contact forms for email header injection vulnerabilities?

To test contact forms for email header injection, inject CRLF sequences into user-controlled fields like subject or reply-to, using a structured testing methodology to identify vulnerabilities in features that construct SMTP messages from user input.

What are the best ways to bypass SPF, DKIM, and DMARC for email spoofing?

Bypassing SPF, DKIM, and DMARC for email spoofing involves manipulating SMTP header construction to exploit authentication protocol weaknesses, with specific strategies to bypass these email authentication mechanisms for spoofing and phishing amplification.

Does this email header injection testing approach support PHP, Python, and Node.js?

Yes, this email header injection testing covers vulnerability patterns for PHP mail(), Python smtplib, and Node.js nodemailer, handling SMTP message construction vulnerabilities across these specific programming environments.

Can email client rendering attacks perform CSS-based data exfiltration?

Yes, email client rendering attacks can perform CSS-based data exfiltration, remote image tracking, and form action hijacking, exploiting how email clients process and display embedded HTML and CSS content.

Why does user input in password reset flows cause email spoofing?

User input in password reset flows causes email spoofing when SMTP messages are constructed with unvalidated user-controlled fields, allowing attackers to inject headers to manipulate the recipient or sender for authentication bypass and phishing amplification.