Skip to content
Race condition Write-up Intermediate

TOCTOU in the Wild: How a Timing Bug Bypassed SaaS Workflow Limit

The SaaS platform checked the number of active workflows before activating a new one but did not enforce the limit atomically, so sending multiple activation requests in parallel allowed more than the plan's five active workflows to run. An attacker could bypass the subscription plan restriction.

SaY_Mekky Follow

Published on medium.com

In this article, I’ll walk through a real-world vulnerability scenario I discovered while testing a public program on HackerOne. Rather than focusing on tools or exploits, the goal is to show how simply understanding how a system works can lead you to uncover behavior that was never intended to happen.

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

Root cause

Likely the backend performed a non-atomic check of the active workflow count before activation, without locking or re-checking at the time of use.

Impact

More than five workflows could be activated simultaneously, bypassing the SaaS plan restriction; the report was accepted as medium severity and a bounty was paid.

What the attacker needed

A free account on the SaaS platform; ability to send parallel HTTP requests

How it was found

  1. Create multiple workflows (16 in total) and collect their IDs from the workflow listing response.
  2. Capture a workflow activation request in Burp Suite.
  3. Duplicate the activation request in a Repeater group until the number matches the workflow IDs.
  4. Modify each request to use a different workflow ID.
  5. Send all requests in parallel using the Repeater group's parallel send option.

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 workflow is an automated task in a SaaS app. The plan allowed only five active workflows at once. The server checked the count, then activated, but if many requests arrived at the same moment, each check saw fewer than five and all activations succeeded, so the limit was exceeded.

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.

More by SaY_Mekky

View all

1 more disclosed report, 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.