Skip to content
CSRF Write-up Intermediate

Put.io API design issues – “I can haz your files”

The Put.io API allowed JSONP responses and cookie-authenticated state-changing requests without CSRF tokens. An attacker could make a logged-in user visit a malicious page to read sensitive account data and perform actions such as sending friend requests, sharing files, and creating folders.

blog.miki.it

Published on blog.miki.it

Put.io is a great torrent cloud storage service that allows to almost instantly stream videos you download from a Torrent.

Michele Spagnuolo, on blog.miki.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

Impact

An attacker could exfiltrate sensitive account data and perform actions on behalf of the victim, including sharing all files and sending friend requests, with no user interaction beyond visiting a URL.

What the attacker needed

Victim is logged in to Put.io; victim visits a malicious page

The fix

The API was fixed by removing JSONP and cookie authentication from the endpoints.

How it was found

  1. The attacker hosts a malicious HTML page that includes script tags pointing to Put.io API endpoints with a callback parameter.
  2. A logged-in Put.io user visits the malicious page.
  3. The page reads the user's account information, file list, events, transfers, and friends from the JSONP responses.
  4. The page submits hidden forms to send a friend request, share all files, create a folder, and add a transfer.

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.

The website's API trusted the browser's automatic login cookie and also allowed other websites to read its responses using a technique called JSONP. This meant a malicious page could silently fetch the user's private data and trigger actions like sharing files, just by being visited.

What is CSRF?

Another site makes a signed-in user's browser perform an action they did not intend.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site request forgery (CSRF)

The lesson behind this report.

Another site makes a signed-in user's browser perform an action they did not intend.