Skip to main content

Over 150 LLM Providers · Over 5,300 Models The most extensible AI-powered pentesting platform. Open source. Star on GitHub

CVE-2025-6921

7.5 · HIGH
Published Sep 23, 2025 huggingface CWE-400 EPSS 0.51% (41th pctl)

Overview

CVE-2025-6921 is a high-severity vulnerability affecting huggingface transformers. It was published on September 23, 2025 and has a CVSS 3.1 base score of 7.5 (HIGH).

This vulnerability has a CVSS 3.1 base score of 7.5, rated HIGH. It can be exploited remotely over the network. No authentication or special privileges are required for exploitation.

Technical Description

The huggingface/transformers library, versions prior to 4.53.0, is vulnerable to Regular Expression Denial of Service (ReDoS) in the AdamWeightDecay optimizer. The vulnerability arises from the _do_use_weight_decay method, which processes user-controlled regular expressions in the include_in_weight_decay and exclude_from_weight_decay lists. Malicious regular expressions can cause catastrophic backtracking during the re.search call, leading to 100% CPU utilization and a denial of service. This issue can be exploited by attackers who can control the patterns in these lists, potentially causing the machine learning task to hang and rendering services unresponsive.

Remediation

Check the references section for vendor advisories and patches from huggingface. Update transformers to the latest patched version. If immediate patching is not possible, review the CVSS vector to understand the attack surface and apply compensating controls such as network segmentation or access restrictions.

Affected Products

Vendor Product Versions Status
huggingface transformers >= 0, < 4.53.0 Affected

Frequently Asked Questions

What is CVE-2025-6921?

CVE-2025-6921 is a high-severity vulnerability affecting huggingface transformers. It was published on September 23, 2025 and has a CVSS 3.1 base score of 7.5 (HIGH).

How severe is CVE-2025-6921?

This vulnerability has a CVSS 3.1 base score of 7.5, rated HIGH. It can be exploited remotely over the network. No authentication or special privileges are required for exploitation.

How do I fix or remediate CVE-2025-6921?

Check the references section for vendor advisories and patches from huggingface. Update transformers to the latest patched version. If immediate patching is not possible, review the CVSS vector to understand the attack surface and apply compensating controls such as network segmentation or access restrictions.

How can CyberStrike help with CVE-2025-6921?

CyberStrike's AI-powered security agents can automatically detect CVE-2025-6921 across your infrastructure using autonomous pentesting, DAST scanning, and HackBrowser. The platform continuously monitors for known vulnerabilities and provides actionable remediation guidance prioritized by real-world exploitability.