The tgrep module contains a regular expression denial of service (ReDoS) issue. The ` tgrep node action()` function compiles user-supplied regular expressions within `/regex/` pattern nodes and executes them using `re.search` against tree node labels without validation or timeouts. An attacker controlling the tgrep pattern, such as through `tgrep positions()` or `tgrep compile()` exposed to external input, can provide a pattern that triggers catastrophic backtracking—a condition where the regex engine takes an exponential amount of time to process a string—leading to indefinite CPU saturation and blocking the Python process.