VDB

CVE-2024-12720

CVE-2024-12720 PUBLISHED CVSS 5.3 MEDIUM

Regular Expression Denial of Service (ReDoS) in huggingface/transformers

Reported by @huntr_ai · Published March 20, 2025

transformers is fixed in 4.48.0 (PyPI)

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

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
transformersPyPI4.48.0
tritonserver-backend-tensorrtllm-24.04Chainguard0.9.0-r4
transformershuggingface4.48.0
huggingface/transformershuggingface4.48.0

Risk scores

CVSS 3.0
5.3
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

Affected products

VendorProductVersions
huggingfacehuggingface/transformersunspecified
huggingfacehuggingface/transformers*

Timeline

  • Mar 20, 2025 CVE Published
  • Mar 20, 2025 EPSS Score (30 in total, the first dated here)
  • Mar 27, 2025 Coalition ESS Score (20 in total, the first dated here)
  • Mar 10, 2026 Security Advisory

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2024-12720
vulnetix vdb fixes CVE-2024-12720

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2024-12720/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

References

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›