Software
Breachwright
Get in Touch
← Back to the database
medium · 5.3Maintainer reviewedAASD-2025-0005

Transformers dynamic module import parsing permits regular-expression denial of service

Hugging Face Transformers versions from 4.49.0 through 4.50.x used an inefficient regular expression while discovering imports in dynamically loaded model code. Processing attacker-influenced module text could consume excessive CPU, disrupting model loading, serving, or development pipelines.

Prerequisites

  • A vulnerable service or pipeline analyzes attacker-influenced dynamic model module code

Potential impact

  • Excessive CPU consumption during dynamic import discovery
  • Disruption of model loading, inference availability, or development pipelines

Mitigations

  • Upgrade Transformers to version 4.51.0 or later
  • Do not enable or process unreviewed remote model code in production workflows
  • Apply execution time and resource limits to model ingestion and loading workers

Public sources

Research note

Not listed in the CISA Known Exploited Vulnerabilities catalog when verified on 2026-07-28.