Stored XSS on rockstar game
The comment feature on Rockstar's Snapmatic photo pages did not filter malicious tags or JavaScript, allowing stored cross-site scripting. An attacker could execute script in the browser of anyone viewing the photo page, potentially redirecting them to a phishing site or logging keystrokes.
Published on medium.com
#### Arbaz Hussain
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 comment input was not sanitised or escaped before being rendered in the page, allowing HTML and JavaScript to be stored and executed.
Impact
An attacker could run arbitrary JavaScript in the browser of any user viewing the Snapmatic page, enabling redirection to phishing sites or keystroke logging; however, CSRF protections prevented a self-propagating worm.
What the attacker needed
A Rockstar Social Club account; victim views the Snapmatic page
How it was found
- Send a comment containing a script payload to the Snapmatic comment endpoint.
- Observe that the script executes (a popup appears) when the comment is rendered.
- View the Snapmatic main page and see that the script also runs there because the first comment is rendered.
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.
When you leave a comment on a website, the site should treat it as plain text, not as code. Here, the site inserted the comment directly into the page without cleaning it, so a comment containing a script tag would run as code in the browser of anyone who viewed the photo. This is called stored cross-site scripting because the malicious script is saved on the server and runs for every visitor.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.