Humorous XSS Vulnerabilities in a Movie Website
The list title field on a movie website's user profile accepted script tags without sanitisation, so a stored cross-site scripting payload could be saved and run in the browsers of visitors to that profile. The author demonstrated playing an audio file after a click and rewriting all page links to point to another site.
medium.com
Published on medium.com
Here’s another follow-up article. I’ll be sharing more vulnerabilities I discovered on a popular Turkish movie website, which I mentioned in my previous post.
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 list title was stored and later rendered into the profile page without output encoding or sanitisation, and there was no length limit on the field.
Impact
An attacker could run JavaScript in the browser of anyone who viewed the malicious profile, which in the demonstrated cases played audio after a click or redirected all links to another site; the text does not show theft of accounts or data.
What the attacker needed
A user account on the site; victim visits the malicious profile; victim clicks on the page for the audio example
The fix
The list title should be sanitised and given a character limit before it is stored or rendered, and output encoding should be applied when displaying it.
How it was found
- Create a new list from the 'Create New List' section in the user profile.
- Name the list with a script payload in the title field.
- Add movies or TV series to the list and publish it on the profile.
- Visit the profile and click anywhere on the page to trigger the stored script.
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.
A cross-site scripting (XSS) bug lets an attacker save JavaScript code in a place where other people's browsers will run it. Here, the title of a movie list was shown on a public profile without being cleaned, so any visitor to that profile would run the author's code. That code could play a sound or change links, and in a real attack it could do more harmful things.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.