Skip to content
Business logic Write-up Beginner

How I lost my followers on Medium

The unfollowUser GraphQL mutation could be resent repeatedly to decrease the displayed follower and following counts on a profile, even without a real follow relationship. An attacker could manipulate the numbers shown on any profile, potentially to negative values, but real follower relationships were not affected.

Florian Follow

Published on medium.com

I was writing a new article on Medium when I started procrastinating and looking at the traffic this website is producing. Knowing there is a bug bounty program on Medium that I was awarded before, I thought maybe I am lucky once again and decided to play around with the following and unfollowing calls.

FHantke, 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

Impact

A malicious user could manipulate the displayed follower and following counts on a profile, even to negative numbers, but real follower relationships were not affected.

What the attacker needed

A Medium account; ability to send GraphQL requests

The fix

The bug was fixed by Medium after being reported.

How it was found

  1. Capture the unfollowUser GraphQL request in the browser's developer tools.
  2. Resend the same request multiple times.
  3. Observe the follower and following counts on the target profile decrease with each resend.

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.

A website's follow button sends a request to a server to change who you follow. The server did not check whether the request made sense, so sending the same 'unfollow' request many times kept reducing the displayed count. This let someone make a profile show wrong follower numbers, but it did not actually remove real followers.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

More from Medium

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.