How I Used an IDOR to Trigger XSS and Take Over All Accounts
An IDOR in the email template editor allowed an attacker to save data to any user's account by changing the outer eventID parameter while the inner eventID remained the attacker's. This enabled stored XSS, which could lead to account takeover and mass compromise due to sequential IDs.
During an application security review of an event management platform, my focus was squarely on authorization. The goal was simple: could one user’s data be accessed by another?
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the server checked authorization only on the top-level eventID parameter but not on the eventID inside the nested JSON data, allowing an attacker to write to another user's template.
Impact
The stored XSS could lead to account takeover of any user, and because IDs were sequential, an attacker could automate the attack to compromise all accounts on the platform.
What the attacker needed
A free account; victim has an account; attacker can intercept requests
The fix
The platform should apply consistent authorization checks on all eventID parameters, including those nested within JSON data, and properly validate and encode user input.
How it was found
- Create two accounts, Attacker and Victim.
- In the Attacker account, go to the Email Template Editor and add a text block.
- Intercept the request and observe the json parameter containing a nested eventID.
- Inject an XSS payload into the text field and confirm it executes in the Attacker's own account (self-XSS).
- Modify the outer eventID to the Victim's ID while keeping the inner eventID as the Attacker's, then send the request.
- Check the Victim's account to see the stored XSS payload in their email template.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
The platform had a feature to edit email templates. The attacker could change a hidden identifier to save their own template content into another user's account. Because the content could include a script, it would run when the victim viewed the template, letting the attacker take over accounts.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.