Email injection & parameter pollution payload generator for bug bounty and authorized penetration testing.
This tool is intended strictly for:
- Bug bounty programs where email endpoints are in scope
- Systems you own or have explicit written authorization to test
Never run this against production systems or accounts without permission. Unauthorized testing is illegal under laws such as the CFAA (US), Computer Misuse Act (UK), and equivalents globally.
| Vulnerability class | Description |
|---|---|
| Email header injection | CRLF sequences inject Bcc/Cc/Reply-To headers |
| Parameter pollution | Sending duplicate or array-type email fields |
| Type confusion | Array vs string, object vs string mismatches |
| OTP/reset to multiple recipients | Logic flaw allowing notification to attacker |
| JSON injection | Breaking out of JSON string context |
| Encoding bypass | Double-encoding, null bytes, Unicode separators |
# No dependencies required (stdlib only)
python3 email_payload_forge.py -o victim@target.com -a attacker@gmail.comOptions:
| Flag | Description |
|---|---|
-o |
Original/target email address |
-a |
Attacker/collector email |
-f CATEGORY |
Filter output by category name |
-e output.txt |
Export payloads to .txt file |
--list-cats |
List all categories and counts |
Examples:
# Generate all payloads
python3 email_payload_forge.py -o victim@target.com -a attacker@gmail.com
# Filter to CRLF injection only
python3 email_payload_forge.py -o victim@target.com -a attacker@gmail.com -f "CRLF Bcc"
# Export for Burp Intruder
python3 email_payload_forge.py -o victim@target.com -a attacker@gmail.com -e payloads.txtRequirements:
- Burp Suite Pro or Community
- Jython standalone JAR (≥ 2.7.3)
Setup:
- Download Jython standalone JAR
- In Burp:
Extender > Options > Python Environment→ set JAR path Extender > Extensions > Add- Extension type: Python
- File:
EmailPayloadForge_burp.py
- The EmailPayloadForge tab appears in Burp
Usage:
- Intercept a password-reset or sign-up request in Proxy
- Right-click → Send to EmailPayloadForge
- Set target email, attacker email, and parameter name in the tab
- Click Generate & preview payloads to populate the table
- For automated sending, open the Python console and call:
burpCallbacks.getExtension("EmailPayloadForge").send_all()
- Results (status, length, reflection) update in the table
- Entries marked REFLECTED=YES are high-priority findings
- Export
.txtwith-e payloads.txt - Send target request to Intruder
- Highlight the email parameter value → Add §
- Payloads tab → Simple list → Paste from file
- Run attack; sort by Response Length or grep for attacker email
| Signal | Meaning |
|---|---|
| Attacker email in response body | Reflection — likely OTP/link sent to attacker |
| Status 200 vs 400/422 | Payload bypassed validation |
| Response length change | Different code path triggered |
| Duplicate email in logs | Both addresses received notification |
MIT — for authorized security research only.