The One-Click Library Wipe: Exploiting CSRF in Saved Stories
A state-changing bookmark action used a GET request with a token that was leaked by a separate email-check endpoint, allowing an attacker to add or delete any user's saved stories via CSRF. The attacker could silently modify a victim's library with a single click.
infosecwriteups.com
Published on infosecwriteups.com
Most people look at a URL and see a way to get to a page. As a researcher, I look at a URL and see a set of instructions.
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 CSRF token was not tied to the user's session and was leaked by an unrelated endpoint, and the state-changing action used a GET request.
Impact
An attacker could silently add or delete any user's saved stories with a single click, as demonstrated by deleting the entire library.
What the attacker needed
Victim is logged in; victim clicks a link; attacker knows victim's email
The fix
The endpoint was secured and origin validation was properly implemented.
How it was found
- Save an article and observe the GET request to /bookmarks/apply with parameters zx, nid, and action.
- Find a separate endpoint that checks user emails and leaks the zx token for that user.
- Craft an HTML page with a hidden form that auto-submits to the bookmark endpoint using the stolen token.
- Host the page and send the link to a logged-in victim.
- The victim's saved stories are modified (add or delete) without their knowledge.
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.
This is a cross-site request forgery (CSRF) bug, where a malicious website can make a logged-in user's browser send a request to another site without the user knowing. The site tried to protect against this with a secret token, but that token was exposed by a different part of the site, so the protection failed.
What is CSRF?
Another site makes a signed-in user's browser perform an action they did not intend.