Skip to content
DoS Advisory Intermediate CVE-2021-43805

GHSL-2021-099: ReDoS (Regular Expression Denial of Service) in Solidus - CVE-2021-43805

The email validation regex in Solidus is vulnerable to catastrophic backtracking, allowing an attacker to cause a denial of service by submitting a crafted email address during checkout. The server spends excessive CPU time processing the input, potentially making the application unresponsive.

ghsecuritylab Follow

Originally disclosed on GitHub Security Lab

A user of the system can provide an email address containing a specifically crafted string that will trigger a ReDoS vulnerability when checking out an order.

ghsecuritylab, on GitHub Security Lab

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 report has not been written yet. The Original tab links to the source.

How it worked

Root cause

The regex pattern contains a nested quantifier that allows multiple ways to match the same substring, leading to exponential backtracking when the overall match fails.

Impact

An attacker could cause a denial of service by making the server spend excessive CPU time processing the malicious email, potentially affecting availability for other users.

What the attacker needed

A user account; ability to reach checkout; client-side validation bypass

The fix

The vulnerability was fixed by updating the email validation regex to avoid catastrophic backtracking.

How it was found

  1. Create an account on the demo site.
  2. Add an item to the cart and proceed to checkout.
  3. In the email field, disable client-side validation (e.g., by changing the input type to text).
  4. Enter the crafted email address with many repetitions of 'a.'.
  5. Fill in the required address fields and submit the form.
  6. Observe the server taking a long time to respond due to catastrophic backtracking.

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 report has not been written yet. The Original tab links to the source.

A regular expression (regex) is a pattern used to check text, like email addresses. Some regex patterns can take a very long time to fail on certain inputs, which is called a ReDoS (Regular Expression Denial of Service). Here, a specially crafted email address makes the server work extremely hard, slowing it down for everyone.

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 ghsecuritylab

View all

132 more disclosed reports, best first.

More from GitHub Security Lab

View all

The newest disclosed reports for this program.

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.