How qwqoro/mail-injection works
Project type and purpose
• This repository is a set of sample, purposefully-vulnerable web applications demonstrating various E-Mail Injection vulnerabilities (CRLF Injection in SMTP/IMAP, Arbitrary Command-Flag Injection, Improper Input Validation).
• It is not a single monolithic full-stack app but a collection of four independent backend implementations (NodeJS, PHP, Python-IMAP, Python-SMTP) each paired with a minimal static frontend.
File structure
• Top-level:
• HaHacking_Mail-Injection.pdf / slides-PHDays.pdf – research artifacts.
• README.md – project overview & instructions.
• images/ – screenshots and GIF.
• nodejs/, php/, python-imap/, python-smtp/ – four sample apps.
• Each sample app:
• public/ – static assets (index.html, index.css, plus messages.html for IMAP example).
• app.js or app.py / index.php & send.php – HTTP server code and email-submission endpoints.
• No databases; relies on external mail services (SMTP via Postfix, IMAP via Dovecot).
README for additional insights
• It lists each environment, the framework/language used, and the specific vulnerability demonstrated.
• Usage instructions reveal dependencies: Express + smtp-client; PHP mail(); Flask + imaplib; Flask + email + smtplib.
• It requires configuring a local domain (hahacking.local), an SMTP server, and an IMAP server.