Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2025-6921— Regular Expression Denial of Service (ReDoS) in huggingface/transformers

EPSS 0.03% · P10
Get alerts for future matching vulnerabilitiesLog in to subscribe

I. Basic Information for CVE-2025-6921

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
Regular Expression Denial of Service (ReDoS) in huggingface/transformers
Source: NVD (National Vulnerability Database)
Vulnerability 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.
Source: NVD (National Vulnerability Database)
CVSS Information
N/A
Source: NVD (National Vulnerability Database)
Vulnerability Type
未加控制的资源消耗(资源穷尽)
Source: NVD (National Vulnerability Database)
Vulnerability Title
transformers 资源管理错误漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
transformers是Hugging Face开源的一个用于机器学习的应用程序。 transformers 4.53.0之前版本存在资源管理错误漏洞,该漏洞源于_do_use_weight_decay方法处理用户控制的正则表达式时存在缺陷,可能导致正则表达式拒绝服务攻击。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

VendorProductAffected VersionsCPESubscribe
huggingfacehuggingface/transformers unspecified ~ 4.53.0 -

II. Public POCs for CVE-2025-6921

#POC DescriptionSource LinkShenlong Link
AI-Generated POCPremium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2025-6921

登录查看更多情报信息。

IV. Related Vulnerabilities

V. Comments for CVE-2025-6921

No comments yet


Leave a comment