漏洞信息
# 正则表达式拒绝服务(ReDoS)漏洞于huggingface/transformers
## 漏洞概述
Hugging Face Transformers库中的`dynamic_module_utils.py`文件里的`get_imports()`函数存在正则表达式拒绝服务(ReDoS)漏洞。该漏洞通过精心设计的输入字符串触发灾难性回溯,导致CPU消耗过高。
## 影响版本
- **受影响版本**: 4.49.0
- **修复版本**: 4.51.0
## 细节
问题在于正则表达式模式`\s*try\s*:.*?except.*?:`,该模式用于从Python代码中过滤出try/except代码块。攻击者可以通过构造特定的输入字符串,利用此正则表达式模式导致灾难性回溯,造成CPU资源耗尽。
## 影响
此漏洞可能导致远程代码加载中断、模型服务的资源耗尽、供应链攻击向量以及开发管道中断。
提示
尽管我们采用了先进的大模型技术,但其输出仍可能包含不准确或过时的信息。
神龙会尽力确保数据准确,但也请结合实际情况进行甄别与判断。
神龙祝您一切顺利!
漏洞标题
Regular Expression Denial of Service (ReDoS) in huggingface/transformers
漏洞描述信息
A Regular Expression Denial of Service (ReDoS) vulnerability was discovered in the Hugging Face Transformers library, specifically in the `get_imports()` function within `dynamic_module_utils.py`. This vulnerability affects versions 4.49.0 and is fixed in version 4.51.0. The issue arises from a regular expression pattern `\s*try\s*:.*?except.*?:` used to filter out try/except blocks from Python code, which can be exploited to cause excessive CPU consumption through crafted input strings due to catastrophic backtracking. This vulnerability can lead to remote code loading disruption, resource exhaustion in model serving, supply chain attack vectors, and development pipeline disruption.
CVSS信息
N/A
漏洞类别
N/A
漏洞标题
Hugging Face Transformers 安全漏洞
漏洞描述信息
Hugging Face Transformers是Hugging Face开源的为 Jax、PyTorch 和 TensorFlow 打造的先进的自然语言处理。 Hugging Face Transformers 4.49.0版本存在安全漏洞,该漏洞源于dynamic_module_utils.py中get_imports函数的正则表达式复杂性不足,可能导致正则表达式拒绝服务攻击。
CVSS信息
N/A
漏洞类别
其他