Security mailing lists by PureSourceCode

CVE-2025-2099

HIGH 7.5CVSS 3.1

Hugging Face Transformers Regular Expression Denial of Service

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.

Published
19 May 2025
Last modified
17 Jun 2026
Assigned by
security@huntr.dev
NVD status
Analyzed
Weakness
CWE-1333
Also known as
GHSA-qq3j-4f4f-9583PYSEC-2025-40
Sources
NVDJSONOSV GHSA-qq3j-4f4f-9583JSONOSV PYSEC-2025-40JSON

Scores

SourceScored byVersionScoreVector / decision
NVD nvd@nist.gov (Primary) CVSS 3.1 HIGH 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
OSV PyPA CVSS 3.1 HIGH 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
NVD security@huntr.dev (Secondary) CVSS 3.0 MEDIUM 5.3 CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
OSV GitHub CVSS 3.0 MEDIUM 5.3 CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
NVD huggingface transformers
cpe:2.3:a:huggingface:transformers:*:*:*:*:*:*:*:*
<= 4.48.3
OSV PyPI transformers < 4.50.0 4.50.0
OSV PyPI transformers < 4.49.0 4.49.0

References

History

  • 25 Nov 2026 20:58 UTC · NVD: first stored (published 19 May 2025)
  • 25 Nov 2026 20:12 UTC · OSV: first stored (published 19 May 2025)
  • 25 Nov 2026 20:12 UTC · OSV: first stored (published 19 May 2025)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.