Regular Expression Denial of Service (ReDoS) in huggingface/transformers
Default status is the baseline for the product, each version can override it (e.g. patched versions marked unaffected).
| Vendor | Product | Default status | Versions | ||||||
|---|---|---|---|---|---|---|---|---|---|
| huggingface | huggingface/transformers | affected |
|
No data.
| Vendor | Product | Versions |
|---|---|---|
| Huggingface | Transformers | — |
| Source | ID | Title |
|---|---|---|
EUVD |
EUVD-2025-30889 | Hugging Face Transformers vulnerable to Regular Expression Denial of Service (ReDoS) in the AdamWeightDecay optimizer |
Github GHSA |
GHSA-4w7r-h757-3r74 | Hugging Face Transformers vulnerable to Regular Expression Denial of Service (ReDoS) in the AdamWeightDecay optimizer |
No CVSS v4.0
No CVSS v2
This CVE is not in the KEV list.
Exploit prediction score: < 1% (0.511% probability within 30 days)
| Type | Values Removed | Values Added |
|---|---|---|
| CPEs | cpe:2.3:a:huggingface:transformers:*:*:*:*:*:*:*:* | |
| Metrics |
cvssV3_1
|
cvssV3_1
|
| Type | Values Removed | Values Added |
|---|---|---|
| First Time appeared |
Huggingface
Huggingface transformers |
|
| Vendors & Products |
Huggingface
Huggingface transformers |
| Type | Values Removed | Values Added |
|---|---|---|
| References |
| |
| Metrics |
threat_severity
|
cvssV3_1
|
| Type | Values Removed | Values Added |
|---|---|---|
| Metrics |
ssvc
|
| Type | Values Removed | Values Added |
|---|---|---|
| Description | The huggingface/transformers library, versions prior to 4.53.0, is vulnerable to Regular Expression Denial of Service (ReDoS) in the AdamWeightDecay optimizer. The vulnerability arises from the _do_use_weight_decay method, which processes user-controlled regular expressions in the include_in_weight_decay and exclude_from_weight_decay lists. Malicious regular expressions can cause catastrophic backtracking during the re.search call, leading to 100% CPU utilization and a denial of service. This issue can be exploited by attackers who can control the patterns in these lists, potentially causing the machine learning task to hang and rendering services unresponsive. | |
| Title | Regular Expression Denial of Service (ReDoS) in huggingface/transformers | |
| Weaknesses | CWE-400 | |
| References |
| |
| Metrics |
cvssV3_0
|