Skip to content
DoS Disclosed report Intermediate CVE-2025-3263

Transformers's ReDoS vulnerability in get_configuration_file can lead to catastrophic backtracking

A regular expression in the get_configuration_file function of the Transformers library could cause catastrophic backtracking when given a crafted input string. An attacker could exploit this to consume excessive CPU, leading to denial of service in applications using the library.

huggingface/transformers

Originally disclosed on huntr

A Regular Expression Denial of Service (ReDoS) vulnerability was discovered in the Hugging Face Transformers library, specifically in the get_configuration_file() function within the transformers.configuration_utils module. The affected version is 4.49.0, and the issue is resolved in version 4.51.0. The vulnerability arises from the use of a regular expression pattern config\.(.*)\.json that can be exploited to cause excessive CPU consumption through crafted input strings, leading to catastrophic backtracking. This can result in model serving disruption, resource exhaustion, and increased latency in applications using the library.

From the GitHub Advisory Database (GHSA-q2wp-rjmx-x6x9, CC BY 4.0).

The original report as published on the GitHub Advisory Database. Images and videos are our own copies; raw HTML is shown as text. View it on GitHub Advisory Database.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Impact

This could result in model serving disruption, resource exhaustion, and increased latency in applications using the library.

What the attacker needed

Application uses Transformers 4.49.0; attacker can supply input to get_configuration_file

The fix

The issue was fixed in version 4.51.0.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

A regular expression is a pattern used to match text. Some patterns can become extremely slow when given specially crafted input, causing the program to use all available CPU and stop responding. This is called a denial of service because legitimate users can no longer use the service.

What is DoS?

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.

More from huggingface/transformers

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Denial of service

The lesson behind this report.

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.