AVID-2026-R1386
Description
Regular Expression Denial of Service (ReDoS) in huggingface/transformers (CVE-2024-12720)
Details
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).
Reason for inclusion in AVID: CVE-2024-12720 describes a Regular Expression Denial of Service (ReDoS) vulnerability in the huggingface/transformers tokenizer code (tokenization_nougat_fast.py). This affects an AI framework/library used to build, train, deploy, and run AI models, i.e., a core software component in AI pipelines. The issue is a software vulnerability (DoS) with potential impact on availability, and the report provides explicit evidence: affected library, vulnerable function, impact description, CVSS data, and references. This aligns with a software supply chain vulnerability in general-purpose AI systems.
References
- NVD entry
- https://huntr.com/bounties/4bed1214-7835-4252-a853-22bbad891f98
- https://github.com/huggingface/transformers/commit/deac971c469bcbb182c2e52da0b82fb3bf54cccf
Affected or Relevant Artifacts
- Developer: huggingface
- Deployer: huggingface
- Artifact Details:
| Type | Name |
|---|---|
| System | huggingface/transformers |
Impact
AVID Taxonomy Categorization
- Risk domains: Security
- SEP subcategories: S0100: Software Vulnerability
- Lifecycle stages: L06: Deployment
CVSS
| Version | 3.0 |
| Vector String | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L |
| Base Score | 5.3 |
| Base Severity | 🟠 Medium |
| Attack Vector | NETWORK |
| Attack Complexity | 🟢 Low |
| Privileges Required | NONE |
| User Interaction | NONE |
| Scope | UNCHANGED |
| Confidentiality Impact | NONE |
| Integrity Impact | NONE |
| Availability Impact | 🟢 Low |
CWE
| ID | Description |
|---|---|
| CWE-1333 | CWE-1333 Inefficient Regular Expression Complexity |
Other information
- Report Type: Advisory
- Credits:
- Date Reported: 2025-03-20
- Version: 0.3.3
- AVID Entry