GHSL-2021-100: ReDoS (Regular Expression Denial of Service) in Octobox - CVE-2021-32848
A user-supplied search query can trigger catastrophic backtracking in a regular expression used to parse search operators, causing the application to hang for a long time. An attacker could exploit this to cause a denial of service.
Originally disclosed on GitHub Security Lab
A user of the system can provide a specifically crafted search query string that will trigger a ReDoS vulnerability.
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 regular expression contains a repeated group that can match the same text in multiple ways, leading to exponential backtracking when the overall match fails.
Impact
An attacker could cause a denial of service by making the application unresponsive for an extended period.
What the attacker needed
Ability to submit a search query
The fix
The maintainers merged a fix for the vulnerability.
How it was found
- Craft a search query containing a quoted string with many repeated backslash-a sequences.
- Submit the query to the application, which parses it using the vulnerable regular expression.
- The regular expression engine backtracks exponentially, causing a long processing delay.
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 is a pattern used to search text. Some patterns can take a very long time to fail when given specially crafted input, because the computer tries many possible ways to match. Here, a search query with many repeated backslash characters made the pattern take over a minute to process, effectively freezing the application for that user.
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.