How Race Condition helped me break Business Logic of the application
The application allowed users to create groups but enforced unique group names. By sending multiple concurrent requests to create a group with the same name, the attacker could bypass the uniqueness check and create multiple groups with identical names, breaking business logic.
Published on web.archive.org
I am Gautam Nangia, a 20yr old Cyber Security Enthusiast that loves to hack and explore the field of Web Application Security. Currently Pursuing BCA and sharpening my skills in Portswigger.
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 application performed a check for existing group names and then created the group without locking, allowing multiple concurrent requests to pass the check before any group was saved.
Impact
An attacker could create multiple groups with the same name, violating the application's integrity rules and potentially causing confusion or abuse in group management.
What the attacker needed
A user account; ability to send concurrent requests
How it was found
- Intercept the request to create a group.
- Send the request to Turbo Intruder.
- Launch multiple concurrent requests with the same group name.
- Observe that all requests return 200 and multiple groups with the same name are created.
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 race condition happens when a system checks something and then acts, but an attacker can slip in extra actions between the check and the action. Here, the system checked if a group name was already taken, but by sending many requests at the same moment, the attacker got several groups created with the same name before the check could stop them. This breaks the rule that group names must be unique.
What is Race condition?
Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.