Executive brief
A vulnerability in the node-re2 library, a popular tool for safe regular expression processing in Node.js, can cause an entire application to crash. When an attacker provides a specific input that results in a very large replacement string, the library fails to handle the memory limit correctly, leading to an unrecoverable process failure. This results in a denial of service that cannot be caught or prevented by standard error-handling code.
Technical details
The vulnerability exists in `WrappedRE2::Replace` within `lib/replace.cc`. When a global replacement using output-amplifying templates (like `