Home » Database

AVID-2026-R1655

Description

Regular Expression Denial of Service (ReDoS) in huggingface/transformers (CVE-2025-2099)

Details

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.

Reason for inclusion in AVID: The CVE describes a Regular Expression Denial of Service (ReDoS) vulnerability in a widely used AI/ML library (huggingface/transformers). This vulnerability affects a component (transformers.testing_utils.preprocess_string) that is part of the AI software stack and could be exploited to cause high CPU usage or downtime in AI workflows. It directly pertains to software supply chains for general-purpose AI systems since transformers is a core dependency for model training, evaluation, and deployment pipelines. The report provides explicit vulnerability details (CVE-2025-2099, description, affected version, and impact) sufficient to classify it as a security vulnerability in the AI software supply chain.

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-05-19
  • Version: 0.3.3
  • AVID Entry