Loading advisory.
Loading advisory.
Hugging Face Transformers Regular Expression Denial of Service
A Regular Expression Denial of Service (ReDoS) exists in the preprocess_string() function of the transformers.testing_utils module.
Published 2025-05-19 11:22 UTC · Modified 2026-06-10 17:02 UTC
Severity and EPSS are shown separately. Helm does not combine them into one score.
| Package | Ecosystem | Affected | Fixed in | Upgrade command |
|---|---|---|---|---|
| transformers | PyPI | < 4.50.0 git commits in https://github.com/huggingface/transformers: < 8cb522b4190bd556ce51be04942720650b1a3e57 < 4.49.0 versions 0.1, 2.0.0, 2.1.0, 2.1.1, 2.10.0, 2.11.0, 2.2.0, 2.2.1, 2.2.2, 2.3.0, 2.4.0, 2.4.1, 2.5.0, 2.5.1, 2.6.0, 2.7.0, 2.8.0, 2.9.0, 2.9.1, 3.0.0 and 214 more | 4.50.0, 8cb522b4190bd556ce51be04942720650b1a3e57, 4.49.0 | pip install --upgrade 'transformers>=4.50.0'pip install --upgrade 'transformers>=8cb522b4190bd556ce51be04942720650b1a3e57'pip install --upgrade 'transformers>=4.49.0' |
A Regular Expression Denial of Service (ReDoS) exists in the preprocess_string() function of the transformers.testing_utils module. In versions before 4.50.0, the regex used to process code blocks in docstrings contains nested quantifiers that can trigger catastrophic backtracking when given inputs with many newline characters. An attacker who can supply such input to preprocess_string() (or code paths that call it) can force excessive CPU usage and degrade availability.
Fix: released in 4.50.0, which rewrites the regex to avoid the inefficient pattern. ([GitHub][1])
Affected: < 4.50.0
Patched: 4.50.0
No public exploit code known to Helm's sources (Nuclei templates, Metasploit, Exploit-DB and PoC-in-GitHub). That does not mean none exists.
EPSS went from 0.006 on 2026-11-24 to 0.008 on 2026-11-26, over 2 recorded scores.
| Date | Score | Previous | Model |
|---|---|---|---|
| 2026-11-24 | 0.006 | first score | v2026.06.15 |
| 2026-11-26 | 0.008 | 0.006 | v2026.06.15 |