XSS Meets IDOR: A Double Vulnerability Story on a Learning Platform
The platform stored unsanitised HTML in user display names and blog content, and an IDOR in the EmailToFriend endpoint allowed viewing other users' blog data by changing the BlogID parameter. An attacker could trigger stored XSS when viewing blog history or email previews, potentially exfiltrating cookies.
📌 Special thanks to Shah kaif — my dedicated learning partner — for collaborating on this research and finding.
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 application failed to sanitise user-supplied HTML before storing and rendering it, and the EmailToFriend endpoint lacked an authorisation check on the BlogID parameter.
Impact
An attacker could view other users' private blog content and trigger stored XSS to exfiltrate cookies, though the profile page returned a 404 and the XSS required a victim to view the blog history or email preview.
What the attacker needed
A free account; victim views blog history or email preview
How it was found
- Create an account and intercept the registration request to inject raw HTML into the full name field.
- Forward the request and observe the account created with the HTML stored as display name.
- Create a test blog containing XSS payloads in the title and description.
- Access the EmailToFriend endpoint with a BlogID parameter and change the numeric value to view another user's blog data.
- Click 'View History' on a blog post to trigger the stored XSS payload automatically.
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.
This report describes two common web security flaws. First, the site saved HTML code that users typed into their profile name and blog posts without cleaning it, so when that content was shown later, any JavaScript in it could run in a victim's browser (stored cross-site scripting). Second, a page that lets you email a blog post to a friend used a simple number to identify the blog, and changing that number let you see other people's private blog content (insecure direct object reference).
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.