CVE-2025-3263: Transformers: ReDoS in config loader causes serving DoS
GHSA-q2wp-rjmx-x6x9 MEDIUM PoC AVAILABLE CISA: TRACK*Patch Hugging Face Transformers to 4.51.0 in any environment where model configuration loading is reachable from external input. The ReDoS in `get_configuration_file()` allows unauthenticated network attackers to exhaust CPU via crafted path strings, degrading or denying model serving. Low EPSS (0.0004) and no active exploitation, but the no-auth, network-accessible attack vector demands patching in the next maintenance window.
Risk Assessment
Medium risk in isolation, elevated in practice for public-facing inference APIs. CVSS 5.3 with AV:N/AC:L/PR:N/UI:N makes exploitation trivially accessible — no credentials or AI knowledge required. Impact is limited to availability (A:L), but repeated requests against multi-tenant inference infrastructure can cascade into full service disruption. EPSS of 0.0004 indicates very low current exploitation probability; risk rises sharply if PoC tooling matures.
Affected Systems
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| transformers | pip | — | No patch |
| 160.4K
OpenSSF 4.9 7.9K dependents
Pushed yesterday 39% patched
~101d to patch
Full package profile →
| |||
| transformers | pip | < 4.51.0 | 4.51.0 |
| 160.4K
OpenSSF 4.9 7.9K dependents
Pushed yesterday 39% patched
~101d to patch
Full package profile →
| |||
Severity & Risk
Attack Surface
Recommended Action
4 steps-
PATCH
Upgrade transformers to >= 4.51.0 immediately (commit 0720e206c6ba).
-
WORKAROUND (if patching delayed): Allowlist and validate model/config path inputs before they reach transformers; reject strings not matching a strict expected pattern.
-
DETECT
Alert on sustained >80% CPU usage on inference nodes correlated with configuration loading operations; monitor for unusual request patterns to model-loading endpoints.
-
AUDIT
Scan your SBOM or dependency manifests for transformers < 4.51.0 across all services, including transitive dependencies.
CISA SSVC Assessment
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
Classification
Compliance Impact
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2025-3263?
Patch Hugging Face Transformers to 4.51.0 in any environment where model configuration loading is reachable from external input. The ReDoS in `get_configuration_file()` allows unauthenticated network attackers to exhaust CPU via crafted path strings, degrading or denying model serving. Low EPSS (0.0004) and no active exploitation, but the no-auth, network-accessible attack vector demands patching in the next maintenance window.
Is CVE-2025-3263 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2025-3263, increasing the risk of exploitation.
How to fix CVE-2025-3263?
1. PATCH: Upgrade transformers to >= 4.51.0 immediately (commit 0720e206c6ba). 2. WORKAROUND (if patching delayed): Allowlist and validate model/config path inputs before they reach transformers; reject strings not matching a strict expected pattern. 3. DETECT: Alert on sustained >80% CPU usage on inference nodes correlated with configuration loading operations; monitor for unusual request patterns to model-loading endpoints. 4. AUDIT: Scan your SBOM or dependency manifests for transformers < 4.51.0 across all services, including transitive dependencies.
What systems are affected by CVE-2025-3263?
This vulnerability affects the following AI/ML architecture patterns: model serving, inference APIs, training pipelines, agent frameworks.
What is the CVSS score for CVE-2025-3263?
CVE-2025-3263 has a CVSS v3.1 base score of 5.3 (MEDIUM). The EPSS exploitation probability is 0.10%.
Technical Details
NVD Description
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.
Exploitation Scenario
An attacker identifies a public-facing model serving API that accepts a model name or configuration path parameter and calls `get_configuration_file()` internally. They craft a malicious string engineered to trigger catastrophic backtracking in the regex `config\.(.*)\..json` — for example, a long string with many repeated characters matching the pattern prefix but no valid termination. Sending 10-20 concurrent requests with this payload pins all inference worker CPU threads at 100%, causing legitimate inference requests to time out. No authentication, ML knowledge, or advanced tooling required — a simple curl loop suffices.
Weaknesses (CWE)
CVSS Vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L References
- github.com/advisories/GHSA-q2wp-rjmx-x6x9
- github.com/huggingface/transformers/commit/126abe3461762e5fc180e7e614391d1b4ab051ca
- nvd.nist.gov/vuln/detail/CVE-2025-3263
- github.com/huggingface/transformers/commit/0720e206c6ba28887e4d60ef60a6a089f6c1cc76 Patch
- huntr.com/bounties/c7a69150-54f8-4e81-8094-791e7a2a0f29 Exploit 3rd Party
- github.com/doublegate/Claude-AGI Exploit
Timeline
Related Vulnerabilities
CVE-2024-3568 9.6 HuggingFace Transformers: RCE via pickle deserialization
Same package: transformers CVE-2023-6730 8.8 HuggingFace Transformers: RCE via unsafe deserialization
Same package: transformers CVE-2024-11392 8.8 HuggingFace Transformers: RCE via config deserialization
Same package: transformers CVE-2024-11393 8.8 Transformers: RCE via MaskFormer model deserialization
Same package: transformers CVE-2024-11394 8.8 Transformers: RCE via Trax model deserialization
Same package: transformers
AI Threat Alert