yaklang avatar

Email Header Injection

This is a complete playbook for testing email injection vulnerabilities in contact forms, password resets, and any feature that builds SMTP messages from user input. It covers the full attack surface: CRLF injection to add BCC headers or manipulate email bodies, SPF/DKIM/DMARC authentication bypass techniques like subdomain delegation and relaxed alignment, and display name spoofing that works even when all auth checks pass. The source includes actual payloads for PHP mail(), Python smtplib, and Node.js nodemailer, plus less obvious vectors like CSS exfiltration in HTML emails and reply-to hijacking for phishing. Use this when you need to go beyond basic header injection and understand how attackers actually circumvent modern email security controls at both the protocol and client rendering level.

skills.sh installs
3.8K
GitHub stars
2.6K
last updated
Aug 21, 2026

Install

$ npx -y skills add yaklang/hack-skills --skill email-header-injection --agent claude-code

Installs into .claude/skills of the current project.

Files

SKILL: Email Header Injection — Expert Attack Playbook

AI LOAD INSTRUCTION: Expert email header injection and authentication bypass. Covers SMTP CRLF injection, SPF/DKIM/DMARC circumvention, display name spoofing, and mail client rendering abuse. Base models miss the nuance between header injection (technical) and email auth bypass (protocol-level) — this skill covers both attack surfaces.

0. RELATED ROUTING


1. SMTP HEADER INJECTION FUNDAMENTALS

SMTP headers are separated by CRLF (\r\n). If user input is placed into email headers without sanitization, injecting %0d%0a (or \r\n) adds arbitrary headers.

Injection anatomy

Normal header construction:
  To: user@example.com\r\n
  Subject: Contact Form\r\n
  From: noreply@target.com\r\n

Sponsors

Details

Repository
github.com/yaklang/hack-skills
Category
Testing & QA
First seen
Jun 3, 2026

More from yaklang/hack-skills

All 102
1dpearson2699 avatartipkitdpearson2699/swift-ios-skillsImplement and review Apple TipKit feature-discovery UI for iOS 17+ apps. Use when adding or auditing in-app tips, contextual help, coach marks, Tip, TipView, po3.8Kskills.sh installs
2langgenius avatarcomponent-refactoringlanggenius/difyRefactor high-complexity React components in Dify frontend. Use when `pnpm analyze-component --json` shows complexity > 50 or lineCount > 300, when the user ask3.7Kskills.sh installs
3longbridge avatarlongbridge-researchlongbridge/skillsInstitution ratings, consensus price targets, EPS/revenue forecasts, finance calendar, shareholder data, fund holders, insider trades (SEC Form 4), short intere3.7Kskills.sh installs
4dotnet avatarsetup-local-sdkdotnet/skillsInstall a .NET SDK locally for safe preview testing, specific-version pinning, or reproducible team setups — without modifying the system-wide installation. USE3.7Kskills.sh installs
5epiral avatarbb-browserepiral/bb-browser强大的信息获取与浏览器自动化工具。通过浏览器 + 用户登录态,获取公域和私域信息。可访问任意网页、内部系统、登录后页面,执行表单填写、信息提取、页面操作。支持 site 系统(36 平台 103 命令一键调用)、带登录态的 fetch、网络请求拦截与 mock、操作录制等高级功能。3.7Kskills.sh installs
6ramziddin avatarsolidramziddin/solid-skillsUse this skill when writing code, implementing features, refactoring, planning architecture, designing systems, reviewing code, or debugging. This skill transfo3.6Kskills.sh installs