Please note that the content of this book primarily consists of articles
available from Wikipedia or other free sources online. The regular
expression denial of service (ReDoS) is a denial-of-service attack, that
exploits the fact that most regular expression implementations may reach
extreme situations that cause them to work very slowly (exponentially
related to input size). An attacker can then cause a program using a
regular expression to enter these extreme situations and then hang for a
very long time. Regular expression matching can be done by building a
finite-state automaton. Regular expressions can be easily converted to
nondeterministic automata (NFAs), in which is for each pair of state and
input symbol there may be several possible next stat