November 16, 2026
How I Discovered Stored XSS in Event Email Templates
الحمد لله الذي عَلَّمَ بالقلم.. عَلَّمَ الإنسانَ ما لم يَعْلَم.. والصلاة والسلام على خيرِ مُعَلِّمي الناسِ الخير محمد صلى الله عليه وسلم

By ATIT0
2 min read
Hey everyone! In this write-up, I want to share how a simple input validation oversight on an event registration form allowed me to inject custom HTML and XSS payloads that executed directly inside the automated notification emails sent to users.
Reconnaissance
While exploring the target platform during a testing session, I came across an event registration portal "events.example.com". Whenever users register for an event, the application captures input fields — such as first name, last name, and email — and processes them. As a security researcher, my goal is always to check where user-supplied data flows. Does it get reflected on the dashboard? Does it get stored in the database? Or does it get rendered inside automated outbound communications (like emails)?
Injecting the Payload & Steps to Reproduce
To test how the application handled raw user input, I navigated to the event registration page and filled out the details. However, for the First Name and Last Name fields, I decided to test both HTML and XSS payloads:
- In the First Name field, I injected:
<img src=x onerror=alert(0)> - In the Last Name field, I injected a custom HTML/link payload.
After filling in my temporary email address and completing the required fields, I hit submit, and the application processed the registration.
A few moments later, I checked my email inbox. The platform sent the confirmation and login details directly to my email.
When I opened the email message, BOOM! The backend server took my raw input without any proper sanitization or encoding and rendered it directly inside the HTML email template. The injected XSS and HTML tags were parsed live by the email client.
The Real-World Risk
While modern webmail clients block active script execution inside emails, injecting raw HTML or custom links into messages coming from a trusted domain creates a massive vector for phishing and social engineering.
Conclusion
I packaged these findings into a detailed report and sent it to the security team. Their response concluded:
Even though the report was closed as out-of-scope, the journey taught me a valuable lesson: Never limit your security testing to the web browser interface. Always trace where user-supplied data travels.
If you enjoyed this write-up or feel like you learned something new from it, I'd appreciate it if you could share it and follow me for more bug hunting stories and technical breakdowns. Let's connect!
Thanks for reading!