Read the docs
TI-2025-02858 Aliases CVE-2025-3262GHSA-489j-g2vx-39wf

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

Priority HIGH 72CWE-1333Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
Low
Impact type
Denial of service
Confidentiality · integrity · availability
None · None · High
Fix status
Fixed

Attack profile from CVSS 3.1 · NVD. Fix status from CNA and GitHub. Impact type from CWE-1333.

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.

Why it matters now

Exploitation Proof of concept CISA SSVC · not in CISA KEV
EPSS 0.00494 42nd percentileScored 2026-11-07
Public exploit Yes 1 exploit referenceTagged by NVD
Fix Fixed huggingface/transformers (huggingface): 4.51.0transformers (PyPI): 4.51.0

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
Poc
Automatable
Yes
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
huggingfacehuggingface/transformersbefore 4.51.04.51.0Patch availableCNA
—transformers (PyPI)4.49.0 to before 4.51.04.51.0Patch availableGHSA-489j-g2vx-39wf
  • huggingface/transformers Vendorhuggingface Affected before 4.51.0 Fixed in 4.51.0 Patch available CNA
  • transformers (PyPI) Vendor— Affected 4.49.0 to before 4.51.0 Fixed in 4.51.0 Patch available GHSA-489j-g2vx-39wf

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:huggingface:transformers:*:*:*:*:*:*:*:*before 4.51.0Vulnerablehuggingface
  • cpe:2.3:a:huggingface:transformers:*:*:*:*:*:*:*:* Versions before 4.51.0 Vulnerable ·huggingface

Remediation

  • Fix · CNA huggingface/transformers (huggingface) Fixed in 4.51.0
  • Fix · GHSA-489j-g2vx-39wf transformers (PyPI) Fixed in 4.51.0 Advisory →

Fixed in the same release

Records fixed by the same vendor advisory or release, as the CNA lists them.

  • Release ·

    huggingface/transformers 4.51.0

    3 records Highest priority Priority HIGH 1 HIGH, 2 MEDIUM

    Other records, highest priority first

    • TI-2025-02860 Regular Expression Denial of Service (ReDoS) in huggingface/transformersPriority MEDIUM 63
    • TI-2025-02859 Regular Expression Denial of Service (ReDoS) in huggingface/transformersPriority MEDIUM 63

Vendor assessments

Red Hat

Red Hat rating: Moderate. Red Hat's page for this CVE →

Not affected: 5 products
  • OpenShift Lightspeed
  • Red Hat AI Inference Server
  • Red Hat Ansible Automation Platform 2
  • Red Hat Enterprise Linux AI (RHEL AI)
  • Red Hat OpenShift AI (RHOAI)

Timeline

  1. 2026-10-02 Threatist record created from CVE-2025-3262
  2. 2026-10-03 Alias added: GHSA-489j-g2vx-39wf

References

  • TI-2026-04577 Policy Bypass in LightGlue Nested Config Resolution in huggingface/transformers CVSS 3.1CRITICAL 9.6
  • TI-2025-06294 Regular Expression Denial of Service (ReDoS) in huggingface/transformers CVSS 3.1HIGH 7.5
  • TI-2025-06027 Regular Expression Denial of Service (ReDoS) in huggingface/transformers CVSS 3.1HIGH 7.5
  • TI-2025-01837 Regular Expression Denial of Service (ReDoS) in huggingface/transformers CVSS 3.1HIGH 7.5
  • TI-2024-11793 Regular Expression Denial of Service (ReDoS) in huggingface/transformers CVSS 3.1HIGH 7.5
  • TI-2026-01514 Arbitrary Code Execution via Unsafe torch.load() in Trainer Checkpoint Loading in huggingface/transformers CVSS 3.1HIGH 7.8
See all 29 →

Sources