ReDoS vulnerability in Hugging Face Transformers regex patterns fixed
Hugging Face Transformers contained regular expressions vulnerable to ReDoS attacks in tokenization modules for Nougat and Japanese language models. The vulnerability was fixed through code changes that avoid catastrophic backtracking.
What happened
Exploitable regular expressions in the Nougat and GPTSan/GPTNeoXJapanese tokenization modules of Hugging Face Transformers displayed catastrophic backtracking behaviour.
The vulnerability was addressed by replacing the affected regex patterns with alternative versions that use possessive quantifiers in Python 3.11+ or modified patterns for earlier Python versions.
Classification
Sources and evidence
Sources not yet published
This record was researched and written by the Index from original reporting. Its sources are still being verified by an editor, and they are listed here once that check is complete. Until then the record carries no reviewer.