Stored XSS in episode notes allows for account takeover
A stored cross-site scripting flaw in the episode notes field let an attacker inject JavaScript that ran in the browser of anyone viewing the episode, including administrators. This could allow theft of session cookies or tokens and potentially full account takeover.
medium.com
Published on medium.com
Hello, I’m Ahmed Mahmoud. I work as a penetration tester on HackerOne.
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 did not sanitise or encode user-supplied input in the episode notes field before rendering it.
Impact
The script could steal cookies or authentication tokens and potentially lead to full account takeover if an administrator visits the malicious page.
What the attacker needed
Ability to create and publish an episode; victim visits the episode link
The fix
The application should sanitise and encode all user-supplied input before rendering, restrict input fields to safe HTML only, and use a library such as DOMPurify to strip unsafe tags and attributes.
How it was found
- Log in and create a new episode.
- In the Episode Notes field, insert a JavaScript payload.
- Save and publish the episode.
- Copy the public link of the episode and share it.
- When any user (including an admin) visits the link, the malicious script runs 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.
Stored cross-site scripting (XSS) is when a website saves harmful code that a user types in, and later shows it to other people without cleaning it. Here, the episode notes field saved whatever was typed, so a script could run in the browser of anyone who opened the episode. That script could then steal the viewer's login details.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.