Skip to content
DoS Write-up Intermediate

$6,500 for a Regex That Couldn’t Say No: ReDoS in an Email Validation Field

The email validation regex on a newsletter signup form contained nested quantifiers vulnerable to catastrophic backtracking, so a single small request with a crafted email address could pin a CPU core for minutes. An attacker could send such requests to exhaust server resources and deny service to legitimate users.

T4nv1 Follow

Published on medium.com

Most denial-of-service findings in bug bounty programs get an immediate, reasonable skepticism from triage, because flooding an endpoint with traffic isn’t usually an interesting vulnerability — it’s just traffic, and most programs explicitly exclude volumetric DoS from scope entirely. This bug was different in kind…

T4nv1, 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 server-side email validation regex used nested or overlapping quantifiers, which causes catastrophic backtracking on crafted input.

Impact

A single unauthenticated request could cause disproportionate CPU consumption, and repeated or parallel submissions could plausibly exhaust request-handling capacity platform-wide, denying service to legitimate users.

What the attacker needed

No account needed; access to the signup form; ability to send HTTP requests

The fix

The vulnerable pattern was replaced with a safer bounded alternative and an input length cap was added; additionally, a hard execution timeout on regex evaluation and an audit of other patterns were recommended.

How it was found

  1. Submit a normal valid email to the signup form and measure the fast baseline response time.
  2. Submit a crafted email with a long run of matching characters followed by a character that forces the match to fail, and observe a much slower response.
  3. Repeat with increasing lengths of the repeated character run and record response times to show exponential growth.

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 regular expression is a pattern used to check text, like whether an email address looks valid. Some patterns can be written so that a carefully crafted input makes the checking program try an enormous number of possible matches, taking exponentially longer as the input grows. Here, a single short email address sent to a signup form could keep a server busy for a long time, potentially stopping it from serving other users.

What is DoS?

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.

More by T4nv1

View all

113 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Denial of service

The lesson behind this report.

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.