commonmark/cmark

Quadratic behavior when scanning inline HTML comments

Closed this issue · 3 comments

python3 -c 'print("a"+"<!--"*50000)' |build/src/cmark >/dev/null

This regressed in commit 4470ff3. Found by OSS-Fuzz.

jgm commented

I already have a fix for this which I'll push later.

jgm commented

Fixed by 6a5126a

FYI, this bug also affected cmark-gfm (GitHub's fork of cmark), where we have assigned it CVE-2023-22484.