Skip to content
XSS Write-up Beginner

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.

Arbaz Hussain Follow

Published on medium.com

Bounty$1,000 View original

#### Arbaz Hussain

Arbaz Hussain, on medium.com

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

  1. Send a comment containing a script payload to the Snapmatic comment endpoint.
  2. Observe that the script executes (a popup appears) when the comment is rendered.
  3. 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.

More by Arbaz Hussain

View all

14 more disclosed reports, best first.

More from Rockstar Games

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.