Логотип exploitDog
Консоль
Логотип exploitDog

exploitDog

github логотип

GHSA-qq3j-4f4f-9583

Опубликовано: 19 мая 2025
Источник: github
Github: Прошло ревью
CVSS3: 5.3

Описание

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. 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

Пакеты

Наименование

transformers

pip
Затронутые версииВерсия исправления

< 4.50.0

4.50.0

EPSS

Процентиль: 31%
0.00114
Низкий

5.3 Medium

CVSS3

Дефекты

CWE-1333

Связанные уязвимости

CVSS3: 7.5
redhat
7 месяцев назад

A vulnerability in the `preprocess_string()` function of the `transformers.testing_utils` module in huggingface/transformers version v4.48.3 allows for a Regular Expression Denial of Service (ReDoS) attack. The regular expression used to process code blocks in docstrings contains nested quantifiers, leading to exponential backtracking when processing input with a large number of newline characters. An attacker can exploit this by providing a specially crafted payload, causing high CPU usage and potential application downtime, effectively resulting in a Denial of Service (DoS) scenario.

CVSS3: 7.5
nvd
7 месяцев назад

A vulnerability in the `preprocess_string()` function of the `transformers.testing_utils` module in huggingface/transformers version v4.48.3 allows for a Regular Expression Denial of Service (ReDoS) attack. The regular expression used to process code blocks in docstrings contains nested quantifiers, leading to exponential backtracking when processing input with a large number of newline characters. An attacker can exploit this by providing a specially crafted payload, causing high CPU usage and potential application downtime, effectively resulting in a Denial of Service (DoS) scenario.

EPSS

Процентиль: 31%
0.00114
Низкий

5.3 Medium

CVSS3

Дефекты

CWE-1333