Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SMLLexer won't terminate on simple input #1625

bforte opened this issue Dec 10, 2020 · 2 comments

SMLLexer won't terminate on simple input #1625

bforte opened this issue Dec 10, 2020 · 2 comments


Copy link

bforte commented Dec 10, 2020

When the SMLLexer gets fed the string "exception" it seems to loop indefinitely. Here's a simple example:

from pygments import highlight
from pygments.lexers import SMLLexer
from pygments.formatters import HtmlFormatter

code = 'exception'
print(highlight(code, SMLLexer(), HtmlFormatter()))

Tested on both

$ pygmentize -V
Pygments version 2.3.1, (c) 2006-2017 by Georg Brandl.


$ pygmentize -V
Pygments version 2.7.3, (c) 2006-2020 by Georg Brandl.


Copy link

Thanks for the report, this will be fixed in the next version (probably 2.7.4).

Copy link

legoktm commented Mar 8, 2021

For reference, this was assigned CVE-2021-20270.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

No branches or pull requests

3 participants