Skip to content
Race condition Write-up Intermediate

How i get $100 in just 10 minutes !

The like feature on a social platform did not properly handle concurrent requests, allowing a race condition. An attacker could send many simultaneous like requests to drive the like count negative.

Jody ritonga Follow

Published on medium.com

Bounty$100 View original

Hello everyone ! this is my first medium write up, im very sorry if i have a bad grammar, because english is not my mother tongue. So a quick explaination about me, i am Jody Ritonga, 19 Y.O from indonesia and ill have interest in web security application so much.

Jodyritonga, 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.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 5 min read.

Context

Jody Ritonga, a 19 year old researcher from Indonesia, describes this as his first Medium write-up. The target is a web application he refers to only as Redacted.com, which he describes as being like LinkedIn: users can search for a job, make connections, and read the latest news about a company. The feature involved is posting and liking other people's comments. The weakness class is a race condition, and the reward was $100.

The report does not name the program, the endpoint, the parameter names, the HTTP method, or the server-side technology. The request and response are shown only as screenshots in the original, so the exact bytes are not reproduced here.

Setup

The only tool mentioned is Burp Suite, with the proxy intercept enabled and the Intruder module used. The researcher notes that at the time he did not know about Turbo Intruder and used the traditional Burp Intruder instead. No account details, roles or versions are given.

Finding it

His usual first targets on a new application are missing rate limits and header injection (he calls it poison header injection). Neither worked here. He then switched to using the site as a regular user would, reading every request and feature to understand how they work.

When he reached the commenting and liking feature, the like button caught his attention. When he saw the like button, he decided to test for a race condition. He decided to test for that.

Exploitation

Step 1: capture the like request

He started Burp Suite, turned interception on, and clicked the like button to capture the request that the browser sends. The report shows this request only as an image; the method, URL, headers and body are not written out in text, so they cannot be reproduced here.

Step 2: send it to Intruder and configure a null payload attack

He sent the captured request to Intruder and configured the attack with a null payloads payload type, 100 requests, and a resource pool configured as shown in the report's screenshot. A null payload attack resends the identical request many times without changing anything, which is exactly what is needed to make concurrent state changes collide. The resource pool settings control how many of those requests are in flight at once; the report shows the configuration only as an image and does not state the values.

Step 3: launch the attack and read the responses

After starting the attack, the responses showed what he describes as a double response, which made him ask whether the race condition was actually there. The report shows the Intruder results only as an image.

Step 4: check the post

He then opened the post itself. The like counter displayed a negative value. That is the observable proof: the counter had been driven below zero, which a correctly serialised implementation should never allow.

Step 5: report and reward

He reported the issue to the company's IT manager and received the bounty. The timeline he gives is:

Date Event
07/09/2022 Report sent to the company
12/09/2022 Report noticed and confirmed valid
06/11/2022 Reward paid

Root cause

The report does not include any server-side code or explanation from the company, so the mechanism below is inferred from the behaviour, not confirmed.

A like is normally implemented as a read of the current count followed by a write of the new value, or as a check of whether the user has already liked the item followed by an insert and a counter update. If those steps are not atomic, two requests that arrive at nearly the same time can both read the same starting state and both write a result derived from it. The final counter then reflects only one of the operations, or, depending on the order of the writes, ends up inconsistent with the underlying rows.

Rate limiting would not necessarily help either, since the requests are legitimate and identical; the problem is concurrency, not volume.

Impact

The demonstrated impact is integrity of the like counter: it can be driven to a negative value. The report does not show any further consequence, such as affecting other users' posts, bypassing authorisation, or gaining access to data. The researcher frames it as a simple feature tested quickly, and the company confirmed it as valid and paid $100.

Fix

Based on the behaviour, the fix would be to make the like operation atomic: enforce uniqueness on the (user, item) pair at the database level, and update the counter with a single conditional statement inside a transaction rather than a read-then-write sequence. A constraint that the counter cannot go below zero would also prevent the visible symptom, though it would not fix the underlying race.

Variants to test

  1. Follow, connect and subscribe buttons. These are the same shape as a like: a relationship row plus a counter. Send the follow request 100 times with a null payload attack and check whether the follower count drifts from the number of relationship rows, or goes negative.
  2. Voting and rating endpoints. Upvote and downvote on posts or comments often maintain a score. A positive result is a score that does not match the sum of individual votes, or a score below the minimum possible value.
  3. Comment and post creation. Duplicate submissions under concurrency can create several identical records from one intended action. A positive result is more rows than clicks, or a counter that counts the duplicates.
  4. Invite, referral and coupon redemption. These are classic race condition targets because each use is supposed to be single-use. A positive result is the same code or invite accepted more than once.
  5. Withdrawal and balance operations. If the application exposes any wallet-like balance, concurrent requests can produce a negative balance or double spending. A positive result is a balance that does not reconcile with the transaction history.
  6. Password reset and email verification tokens. Send the same token concurrently and check whether it can be used more than once. A positive result is two successful uses of a token that should be single-use.

In each case, the test method is the same as here: capture one legitimate request, resend it many times with a null payload attack, and then verify the server-side state rather than trusting the response codes alone.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store From the original on medium.com
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 10 min read.

What happened, in plain words

A security researcher found a bug in a website that works a bit like LinkedIn, where people can look for jobs, connect with others and read company news. The site had a feature for posting comments and liking other people's comments. By capturing the like request and resending it many times at once with a tool, he pushed the like counter below zero. The company confirmed the bug was real and paid him $100. He describes the whole thing as taking about ten minutes.

The bug class is called a race condition. The idea is simple: when two things happen at almost the same moment, a program that was written assuming they happen one after another can get confused. Think of two people at an ATM with the same bank card, both withdrawing money at the same instant: if the machine checks the balance for both before either withdrawal is recorded, both can take out money that only one balance should allow. Here, the "balance" is the like counter.

This article walks through exactly what he did, step by step, and explains every tool and term along the way. It is written for someone who has never done security testing before.

Background and setup

Jody Ritonga is 19 years old, from Indonesia, and says this is his first write-up on Medium. He refers to the target only as Redacted.com. He describes it as a site where you can search for a job, make connections, and read the latest news about a company, so it is a professional social network.

Before testing anything, it helps to know a few basics:

  • Web application: a program that runs on a server and that you use through your browser. When you click a button, your browser sends a message to the server and the server sends back a result.
  • Request and response: the message your browser sends is the request; the message the server sends back is the response. Every click, every page load, is made of these two things.
  • API: the set of addresses and rules a web application exposes so that the browser (or an app) can ask it to do things, such as "like this comment". You can think of it as a waiter: you tell the waiter what you want, the waiter goes to the kitchen, and brings back the result. You never walk into the kitchen yourself.
  • Cookie or session token: a small piece of data your browser stores and sends with every request so the server knows who you are. It is like a wristband at an event: you show it once at the door, and after that staff recognise you without asking for your ID again. Because it proves who you are, it is sensitive and should never be shared.
  • Burp Suite: a tool used by security testers that sits between your browser and the website. It can pause (intercept) each request so you can read and change it before it is sent. It also has modules that can resend a request many times automatically.
  • Intercept: the mode in Burp Suite where every request from your browser is held so you can look at it. It is like a mailroom that holds every letter so you can read it before it goes out.
  • Intruder: the Burp Suite module that takes one captured request and sends it again and again, optionally changing parts of it each time. It is the automated version of clicking a button over and over.
  • Null payload: an Intruder setting that changes nothing between requests. The same request is sent repeatedly, byte for byte. That is exactly what you want when testing a race condition, because the point is to make identical actions collide.
  • Resource pool: an Intruder setting that controls how many requests are allowed to be in flight at the same time. More in flight at once means a better chance that two of them reach the server close enough together to collide.
  • Turbo Intruder: a faster extension for Burp Suite for sending many requests at once. The researcher notes he did not know about it at the time and used the traditional Burp Intruder instead.
  • Rate limit: a cap a server puts on how many requests you can make in a period of time. Its absence is a common bug, and it was one of the things he looked for first.
  • Header injection: a class of bug where an attacker manages to insert extra data into the headers of a request or response. Headers are the small labelled fields that travel with every request, such as which browser you use. He calls it "poison header injection".

Finding it

His usual first targets on a new site are missing rate limits and header injection. Neither worked here. So he switched approach: he used the site the way an ordinary user would, reading every request and feature to understand how the site works. This is a useful habit, because you cannot spot something behaving oddly until you know what normal looks like.

When he reached the commenting and liking feature, the like button caught his attention. When he saw the like button, he decided to test for a race condition.

Exploitation

Step 1: capture the like request

He started Burp Suite, turned interception on, and clicked the like button so that the request the browser sends would be captured. The report shows this request only as an image. The method, the address, the headers and the body are not written out in text, so they cannot be reproduced here.

Step 2: send it to Intruder and configure a null payload attack

He sent the captured request to Intruder and set up the attack with a null payloads payload type, 100 requests, and a resource pool configured as shown in the report's screenshot. A null payload attack resends the identical request many times without changing anything, which is exactly what is needed to make simultaneous changes collide. The resource pool settings control how many of those requests are in flight at once; the report shows that configuration only as an image and does not state the values.

Step 3: launch the attack and read the responses

After starting the attack, the responses showed what he describes as a double response, which made him ask whether the race condition was actually there. The report shows the Intruder results only as an image.

Step 4: check the post

He then opened the post itself. The like counter displayed a negative value. That is the visible proof: the counter had been driven below zero, which a correctly built implementation should never allow.

Step 5: report and reward

He reported the issue to the company's IT manager and received the bounty. The timeline he gives is:

Date Event
07/09/2022 Report sent to the company
12/09/2022 Report noticed and confirmed valid
06/11/2022 Reward paid

Why it works

The report does not include any server-side code or explanation from the company, so the mechanism below is inferred from the behaviour, not confirmed.

A like is normally implemented as a read of the current count followed by a write of the new value, or as a check of whether the user has already liked the item followed by an insert and a counter update. If those steps are not atomic, two requests that arrive at nearly the same time can both read the same starting state and both write a result derived from it. The final counter then reflects only one of the operations, or, depending on the order of the writes, ends up inconsistent with the underlying rows.

Rate limiting would not necessarily help either, since the requests are legitimate and identical; the problem is concurrency, not volume.

Impact

The demonstrated impact is integrity of the like counter: it can be driven to a negative value. The report does not show any further consequence, such as affecting other users' posts, bypassing authorisation, or gaining access to data. The researcher frames it as a simple feature tested quickly, and the company confirmed it as valid and paid $100.

The report does not state whether the effect was limited to the researcher's own likes or visible to other users.

Fix

Based on the behaviour, the fix would be to make the like operation atomic: enforce uniqueness on the (user, item) pair at the database level, and update the counter with a single conditional statement inside a transaction rather than a read-then-write sequence. A constraint that the counter cannot go below zero would also prevent the visible symptom, though it would not fix the underlying race.

Variants to test

  1. Follow, connect and subscribe buttons. These are the same shape as a like: a relationship row plus a counter. Send the follow request 100 times with a null payload attack and check whether the follower count drifts from the number of relationship rows, or goes negative.
  2. Voting and rating endpoints. Upvote and downvote on posts or comments often maintain a score. A positive result is a score that does not match the sum of individual votes, or a score below the minimum possible value.
  3. Comment and post creation. Duplicate submissions under concurrency can create several identical records from one intended action. A positive result is more rows than clicks, or a counter that counts the duplicates.
  4. Invite, referral and coupon redemption. These are classic race condition targets because each use is supposed to be single-use. A positive result is the same code or invite accepted more than once.
  5. Withdrawal and balance operations. If the application exposes any wallet-like balance, concurrent requests can produce a negative balance or double spending. A positive result is a balance that does not reconcile with the transaction history.
  6. Password reset and email verification tokens. Send the same token concurrently and check whether it can be used more than once. A positive result is two successful uses of a token that should be single-use.

In each case, the test method is the same as here: capture one legitimate request, resend it many times with a null payload attack, and then verify the server-side state rather than trusting the response codes alone.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store From the original on medium.com
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store

Glossary

  • API: the set of addresses and rules a web application exposes so that a browser or app can ask it to do things.
  • Atomic: an operation that happens as one indivisible step, so nothing else can slip in halfway through.
  • Burp Suite: a tool that sits between your browser and a website so you can read, pause, change and resend requests.
  • Concurrency: two or more operations happening at overlapping times rather than strictly one after another.
  • Cookie: a small piece of data your browser stores and sends with requests so the server knows who you are.
  • Counter: a number stored by the server that goes up or down as users perform an action, such as the number of likes.
  • Database transaction: a group of database changes that either all succeed or all fail together.
  • Double response: two responses coming back where one was expected, a sign that requests overlapped.
  • Endpoint: a specific address on a server that performs a specific action.
  • Header: a small labelled field that travels with a request or response, such as which browser you use.
  • Header injection: a bug where an attacker manages to insert extra data into request or response headers.
  • Integrity: the property that data is correct and has not been altered in ways it should not be.
  • Intercept: the mode in Burp Suite where each request is held so you can read or change it before it is sent.
  • Intruder: the Burp Suite module that resends one captured request many times, optionally changing parts of it.
  • Null payload: an Intruder setting that changes nothing between requests, so the same request is sent repeatedly.
  • Race condition: a bug where operations that overlap in time produce a wrong result because the program assumed they would happen one after another.
  • Rate limit: a cap on how many requests a user or client can make in a period of time.
  • Request: the message your browser sends to a server when you do something on a website.
  • Resource pool: an Intruder setting that controls how many requests are in flight at the same time.
  • Response: the message a server sends back to your browser.
  • Session token: a value that proves you are logged in, sent with requests in place of your password.
  • Stale read: reading a value that has already been changed by someone else, so the value you act on is out of date.
  • Turbo Intruder: a faster Burp Suite extension for sending many requests at once.

More by Jody ritonga

View all

7 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Race conditions

The lesson behind this report.

Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.