7.5

CVE-2024-12720: Regular Expression Denial of Service (ReDoS) in huggingface/transformers

Analyzed
AliasesGHSA-6rvg-6v2m-4j46PYSEC-2026-1982
Published 20-03-2025Last modified 20-03-2025

Vulnerability summary

CVE-2024-12720 is a high (CVSS 7.5) vulnerability in huggingface huggingface/transformers. EPSS estimates a 0.75% chance of exploitation in the next 30 days, higher than 54.9% of scored vulnerabilities.

Priority
Routine

Not severe (CVSS 5.3, network access); no exploitation reported by the 5 checked sources

Source freshness unavailable

How is this decided?
CVSS score
7.5/10
010
High · v3.1 (NVD)
EPSS score
0.75%
0%100%
Low · +0.01 pp in 30 days
KEVNot listedNot listed by any tracked catalog.
RansomwareNot flaggedNo ransomware use recorded.
Public exploits0No public exploits recorded

Advisory lineage

Upstream 0 · Downstream 0 · Related 2

Timeline

  1. 20-03-2025
    PublishedVulnerability first disclosed.
  2. 20-03-2025
    Last modifiedVulnerability information updated.

Description

A Regular Expression Denial of Service (ReDoS) vulnerability was identified in the huggingface/transformers library, specifically in the file tokenization_nougat_fast.py. The vulnerability occurs in the post_process_single() function, where a regular expression processes specially crafted input. The issue stems from the regex exhibiting exponential time complexity under certain conditions, leading to excessive backtracking. This can result in significantly high CPU usage and potential application downtime, effectively creating a Denial of Service (DoS) scenario. The affected version is v4.46.3 (latest).

CVSS metrics

4 scores · 3 sources · 2 versions

EPSS trend

Probability

0.75%

Chance of exploitation in the next 30 days

Percentile

55%

Versus all other CVEs

30-day change

Increase +0.01 pp

From 0.73% on 04-10-2026

04-10-202603-11-2026

Known exploited

Compare KEV catalogs
CISA KEV

Not in the CISA KEV catalog.

ENISA CNW

Not in the ENISA CNW catalog.

CIRCL

Not in the CIRCL catalog.

Public exploits

0 found

No public exploits indexed.

Weaknesses

CWE · root cause

Affected systems

Version check

Known conditions: network-reachable, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.

Huggingface2 products
PyPI1 product
  • transformers< 4.48.0

2 vendors · 3 products

References

6 links