Skip to content
XSS Write-up Beginner

Google.com cross site scripting and privilege escalation in Consumer Surveys

A survey name field was rendered without proper escaping, so a script payload stored in the name ran in the browser of anyone who opened the survey's create, edit or confirm pages. Separately, the survey deletion endpoint did not check that the caller owned the survey, so any logged-in user could delete another user's paid survey by changing the survey identifier.

Josip Franjkovic Follow

Published on josipfranjkovic.blogspot.com

The original lives on josipfranjkovic.blogspot.com

We do not hold its text, 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 survey name was stored and later inserted into the page without output encoding, and the delete endpoint authorised the request by session and XSRF token only, without verifying ownership of the survey.

Impact

An attacker could run script in the browser of anyone who opened a crafted survey link, and could delete any user's survey on a paid service.

What the attacker needed

Victim opens a crafted survey link; attacker supplies a valid survey identifier

The fix

The report says the issues were fixed after a quick response from the Google Security team.

How it was found

  1. Create a new Consumer Survey and enter a script payload as the survey name.
  2. Click Continue and observe that the script executes.
  3. Open the create, questions/edit or confirm page for that survey using its identifier.
  4. Observe that the script executes again for whoever visits those links.
  5. Send a POST request to the delete_survey endpoint with a survey identifier, your XSRF token and the delete action.
  6. Change the survey parameter to another valid survey and see it deleted.

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 a site shows text you typed back to others, it must treat it as plain text, not code. Here it did not, so a script in a survey name ran in other users' browsers. The second issue is about permission: a single POST request could delete anyone's survey, so anyone could remove someone else's survey.

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 Josip Franjkovic

View all

6 more disclosed reports, best first.

More from Google

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.