Vulnerability · Published Apr 29, 2025 · Assigned by @huntr_ai
CVE-2025-1194Regular Expression Denial of Service (ReDoS) in huggingface/transformers
Medium 4.3
In plain English
A medium-severity regular-expression denial of service in huggingface/transformers from huggingface. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.5% (higher than 42% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
A Regular Expression Denial of Service (ReDoS) vulnerability was identified in the huggingface/transformers library, specifically in the file `tokenization_gpt_neox_japanese.py` of the GPT-NeoX-Japanese model. The vulnerability occurs in the SubWordJapaneseTokenizer class, where regular expressions process specially crafted inputs. The issue stems from a regex exhibiting exponential complexity under certain conditions, leading to excessive backtracking. This can result in high CPU usage and potential application downtime, effectively creating a Denial of Service (DoS) scenario. The affected version is v4.48.1 (latest).
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| PyPI | transformers | 4.50.0 | GHSA-fpwr-67px-3qhx |
| PyPI | transformers | 4.50.0 | PYSEC-2026-1984 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| huggingface | huggingface/transformers | unspecified – before 4.50.0 |
Weakness: CWE-1333 · Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L