GHSL-2020-311: Regular Expression Denial of Service in SquadCal
SquadCal contains a regular expression that checks if a message is all emojis, which is vulnerable to ReDoS. An attacker could send a crafted string of many fist-bump emojis followed by a non-emoji to cause excessive CPU usage, leading to denial of service.
Originally disclosed on GitHub Security Lab
The project contains one or more regular expressions that are vulnerable to ReDoS (Regular Expression Denial of Service)
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
Likely the regular expression has overlapping alternatives that cause exponential backtracking when matching many fist-bump emojis followed by a non-emoji.
Impact
This issue may lead to a denial of service.
What the attacker needed
Ability to send a message; crafted input with many fist-bump emojis
The fix
The issue was fixed by removing ambiguity in the regular expression.
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 match text. Some patterns can be written in a way that makes them very slow when given a specially crafted input, like a long string of the same character. Here, sending many fist-bump emojis followed by a normal character could make the server work very hard and become unresponsive, which is a denial of service.
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.