My first bug in google and how i got CSRF token for victim account rather than bypass it
A bookshelf modification request on Google Books carried a signature parameter that the author could not bypass, but the same signature was exposed in a page shown to unauthenticated visitors. An attacker could build a per-victim proof-of-concept page that reuses that signature to rename or delete another user's bookshelf.
Published on medium.com
Today i will share my first bug in google, Which is in “Books”. I was able to modify/delete bookshelf for victim account by get CSRF token rather than bypass it .
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 signature that protects the bookshelf action was issued to unauthenticated visitors on a public page, so it did not actually bind the request to the victim's session.
Impact
An attacker could rename or delete a victim's bookshelf, but only by crafting a separate proof-of-concept for each targeted victim.
What the attacker needed
Victim is signed in to Google Books; attacker obtains a sig for that victim; victim visits the crafted page
How it was found
- Sign in to Google Books and create a bookshelf.
- Capture the request sent when deleting the bookshelf and note the sig parameter.
- Open the victim's bookshelf page and press the Test option.
- Change the name or description and press save; the request fails because the visitor is not authenticated.
- Inspect that request and observe the sig parameter is present.
- Build a proof-of-concept page using that sig and send it to the victim.
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.
Websites often attach a secret token to actions like saving or deleting, so that another site cannot repeat the action on your behalf. Here the secret was handed out on a public page, so anyone could copy it and build a page that performs the action for a logged-in victim.
What is CSRF?
Another site makes a signed-in user's browser perform an action they did not intend.