The vulnerability lies in the stringMath function in the file string-math.js. The advisory points to a ReDoS vulnerability in a regex on line 7 of this file. By fetching the file content, I confirmed that line 7 contains a while loop with a regex used in the search() method: while (eq.search(/^\s*([+-]?\d*\.?\d+(?:e[+-]\d+)?)\s*$/) === -1). The public disclosure gist provides a proof-of-concept that uses a long string of tab characters to trigger the ReDoS, confirming that this regex is indeed the source of the vulnerability. The stringMath function is the main entry point that takes the user-provided string, and it is this function that contains the vulnerable code. Therefore, stringMath is the vulnerable function.