Home » Database

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

Affected or Relevant Artifacts

  • Developer: huggingface
  • Deployer: huggingface
  • Artifact Details:
TypeName
Systemhuggingface/transformers

Impact

AVID Taxonomy Categorization

  • Risk domains: Security
  • SEP subcategories: S0100: Software Vulnerability
  • Lifecycle stages: L06: Deployment

CVSS

Version3.0
Vector StringCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Base Score5.3
Base Severity🟠 Medium
Attack VectorNETWORK
Attack Complexity🟢 Low
Privileges RequiredNONE
User InteractionNONE
ScopeUNCHANGED
Confidentiality ImpactNONE
Integrity ImpactNONE
Availability Impact🟢 Low

CWE

IDDescription
CWE-1333CWE-1333 Inefficient Regular Expression Complexity

Other information

  • Report Type: Advisory
  • Credits:
  • Date Reported: 2025-03-20
  • Version: 0.3.3
  • AVID Entry