Skip to content
Submit incident
AII-1001-91787
ConfirmedA court, a regulator or the organization itself has stated the core facts, or the record cites a court or regulator source.

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.

29 April 2025 Β· Hugging Face Β· Security and cyberattacks
29 April 2025
AII-1001-917873 sources ↓
Quick facts
Category
Security and cyberattacks
Source
github.com
Date
29 April 2025
Drafted by
Raidu Incident Detection

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

Category
Security and cyberattacks
Industry
IT infrastructure and hosting
Harm status
Potential harm
Intent
Unintentional
Timing
Post-deployment
Consequences
None recorded
AI systems
Transformers

Sources and evidence

This record was researched and written by the Index, based on the following original reporting.

github.com
https://github.com/huggingface/transformers/commit/92c5ca9dd70de3ade2af2eb835c96215cc50e815
huntr.com
https://huntr.com/bounties/86f58dcd-683f-4adc-a735-849f51e9abb2
cve.org
NVD entry