Skip to main content
← All vulnerabilities
CVE-2025-3262GHSA-489J-G2VX-39WFPYSEC-2026-1979

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

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 4.51.0
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: poc
  • Automatable: yes
  • Technical impact: partial

Summary

A Regular Expression Denial of Service (ReDoS) vulnerability was discovered in the huggingface/transformers repository, specifically in version 4.49.0. The vulnerability is due to inefficient regular expression complexity in the `SETTING_RE` variable within the `transformers/commands/chat.py` file. The regex contains repetition groups and non-optimized quantifiers, leading to exponential backtracking when processing 'almost matching' payloads. This can degrade application performance and potentially result in a denial-of-service (DoS) when handling specially crafted input strings. The issue is fixed in version 4.51.0.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: poc · Automatable: yes · Technical impact: partial

  3. Record last updated

Affected versions

  • huggingface huggingface/transformers

    fixed in 4.51.0

  • transformersPyPI

    From 4.49.0 · fixed in 4.51.0

References 2

huntr.com

GitHub · huggingface/transformers