Staging Environment: Content and features may be unstable or change without notice.
Search for packages
Package details: pkg:pypi/transformers@4.44.0
purl pkg:pypi/transformers@4.44.0
Next non-vulnerable version 5.0.0rc3
Latest non-vulnerable version 5.0.0rc3
Risk 10.0
Vulnerabilities affecting this package (15)
Vulnerability Summary Fixed by
VCID-35kz-esn2-1yf5
Aliases:
CVE-2025-6051
GHSA-rcv9-qm8p-9p6j
A Regular Expression Denial of Service (ReDoS) vulnerability was discovered in the Hugging Face Transformers library, specifically within the `normalize_numbers()` method of the `EnglishNormalizer` class. This vulnerability affects versions up to 4.52.4 and is fixed in version 4.53.0. The issue arises from the method's handling of numeric strings, which can be exploited using crafted input strings containing long sequences of digits, leading to excessive CPU consumption. This vulnerability impacts text-to-speech and number normalization tasks, potentially causing service disruption, resource exhaustion, and API vulnerabilities.
4.53.0
Affected by 1 other vulnerability.
VCID-9766-62zk-zqcq
Aliases:
CVE-2025-6921
GHSA-4w7r-h757-3r74
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.
4.53.0
Affected by 1 other vulnerability.
VCID-c1ab-fktw-jud2
Aliases:
CVE-2025-1194
GHSA-fpwr-67px-3qhx
A Regular Expression Denial of Service (ReDoS) vulnerability was identified in the huggingface/transformers library, specifically in the file `tokenization_gpt_neox_japanese.py` of the GPT-NeoX-Japanese model. The vulnerability occurs in the SubWordJapaneseTokenizer class, where regular expressions process specially crafted inputs. The issue stems from a regex exhibiting exponential complexity under certain conditions, leading to excessive backtracking. This can result in high CPU usage and potential application downtime, effectively creating a Denial of Service (DoS) scenario. The affected version is v4.48.1 (latest).
4.50.0
Affected by 10 other vulnerabilities.
VCID-c4mh-fkqh-1qe1
Aliases:
CVE-2025-3264
GHSA-jjph-296x-mrcr
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.
4.51.0
Affected by 7 other vulnerabilities.
VCID-dnej-1umy-qfh4
Aliases:
CVE-2025-3263
GHSA-q2wp-rjmx-x6x9
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.
4.51.0
Affected by 7 other vulnerabilities.
VCID-k7sr-ay64-syg9
Aliases:
CVE-2024-11392
GHSA-qxrp-vhvm-j765
PYSEC-2024-227
Hugging Face Transformers MobileViTV2 Deserialization of Untrusted Data Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of Hugging Face Transformers. User interaction is required to exploit this vulnerability in that the target must visit a malicious page or open a malicious file. The specific flaw exists within the handling of configuration files. The issue results from the lack of proper validation of user-supplied data, which can result in deserialization of untrusted data. An attacker can leverage this vulnerability to execute code in the context of the current user. Was ZDI-CAN-24322.
4.48.0
Affected by 11 other vulnerabilities.
VCID-mu2w-a71e-4bbd
Aliases:
CVE-2024-11394
GHSA-hxxf-235m-72v3
PYSEC-2024-229
Hugging Face Transformers Trax Model Deserialization of Untrusted Data Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of Hugging Face Transformers. User interaction is required to exploit this vulnerability in that the target must visit a malicious page or open a malicious file. The specific flaw exists within the handling of model files. The issue results from the lack of proper validation of user-supplied data, which can result in deserialization of untrusted data. An attacker can leverage this vulnerability to execute code in the context of the current user. Was ZDI-CAN-25012.
4.48.0
Affected by 11 other vulnerabilities.
VCID-pvb2-bzaz-w3bv
Aliases:
CVE-2025-6638
GHSA-59p9-h35m-wg4g
A Regular Expression Denial of Service (ReDoS) vulnerability was discovered in the Hugging Face Transformers library, specifically affecting the MarianTokenizer's `remove_language_code()` method. This vulnerability is present in version 4.52.4 and has been fixed in version 4.53.0. The issue arises from inefficient regex processing, which can be exploited by crafted input strings containing malformed language code patterns, leading to excessive CPU consumption and potential denial of service.
4.53.0
Affected by 1 other vulnerability.
VCID-sfgy-7173-eyby
Aliases:
CVE-2025-3777
GHSA-phhr-52qp-3mj4
Hugging Face Transformers versions up to 4.49.0 are affected by an improper input validation vulnerability in the `image_utils.py` file. The vulnerability arises from insecure URL validation using the `startswith()` method, which can be bypassed through URL username injection. This allows attackers to craft URLs that appear to be from YouTube but resolve to malicious domains, potentially leading to phishing attacks, malware distribution, or data exfiltration. The issue is fixed in version 4.52.1.
4.52.1
Affected by 5 other vulnerabilities.
VCID-tzcs-6fp1-8yes
Aliases:
CVE-2024-11393
GHSA-wrfc-pvp9-mr9g
PYSEC-2024-228
Hugging Face Transformers MaskFormer Model Deserialization of Untrusted Data Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of Hugging Face Transformers. User interaction is required to exploit this vulnerability in that the target must visit a malicious page or open a malicious file. The specific flaw exists within the parsing of model files. The issue results from the lack of proper validation of user-supplied data, which can result in deserialization of untrusted data. An attacker can leverage this vulnerability to execute code in the context of the current user. Was ZDI-CAN-25191.
4.48.0
Affected by 11 other vulnerabilities.
VCID-v4bk-nagm-8bcs
Aliases:
CVE-2025-5197
GHSA-9356-575x-2w9m
A Regular Expression Denial of Service (ReDoS) vulnerability exists in the Hugging Face Transformers library, specifically in the `convert_tf_weight_name_to_pt_weight_name()` function. This function, responsible for converting TensorFlow weight names to PyTorch format, uses a regex pattern `/[^/]*___([^/]*)/` that can be exploited to cause excessive CPU consumption through crafted input strings due to catastrophic backtracking. The vulnerability affects versions up to 4.51.3 and is fixed in version 4.53.0. This issue can lead to service disruption, resource exhaustion, and potential API service vulnerabilities, impacting model conversion processes between TensorFlow and PyTorch formats.
4.53.0
Affected by 1 other vulnerability.
VCID-wkqx-hf5c-8kae
Aliases:
CVE-2026-1839
GHSA-69w3-r845-3855
A vulnerability in the HuggingFace Transformers library, specifically in the `Trainer` class, allows for arbitrary code execution. The `_load_rng_state()` method in `src/transformers/trainer.py` at line 3059 calls `torch.load()` without the `weights_only=True` parameter. This issue affects all versions of the library supporting `torch>=2.2` when used with PyTorch versions below 2.6, as the `safe_globals()` context manager provides no protection in these versions. An attacker can exploit this vulnerability by supplying a malicious checkpoint file, such as `rng_state.pth`, which can execute arbitrary code when loaded. The issue is resolved in version v5.0.0rc3.
5.0.0rc3
Affected by 0 other vulnerabilities.
VCID-wqd9-k9zz-1ycz
Aliases:
CVE-2024-12720
GHSA-6rvg-6v2m-4j46
A Regular Expression Denial of Service (ReDoS) vulnerability was identified in the huggingface/transformers library, specifically in the file tokenization_nougat_fast.py. The vulnerability occurs in the post_process_single() function, where a regular expression processes specially crafted input. The issue stems from the regex exhibiting exponential time complexity under certain conditions, leading to excessive backtracking. This can result in significantly high CPU usage and potential application downtime, effectively creating a Denial of Service (DoS) scenario. The affected version is v4.46.3 (latest).
4.48.0
Affected by 11 other vulnerabilities.
VCID-ydcb-5t2c-1fen
Aliases:
CVE-2025-3933
GHSA-37mw-44qp-f5jm
A Regular Expression Denial of Service (ReDoS) vulnerability was discovered in the Hugging Face Transformers library, specifically within the DonutProcessor class's `token2json()` method. This vulnerability affects versions 4.50.3 and earlier, and is fixed in version 4.52.1. The issue arises from the regex pattern `<s_(.*?)>` which can be exploited to cause excessive CPU consumption through crafted input strings due to catastrophic backtracking. This vulnerability can lead to service disruption, resource exhaustion, and potential API service vulnerabilities, impacting document processing tasks using the Donut model.
4.52.1
Affected by 5 other vulnerabilities.
VCID-ydge-4zba-3khn
Aliases:
CVE-2025-2099
GHSA-qq3j-4f4f-9583
PYSEC-2025-40
A vulnerability in the `preprocess_string()` function of the `transformers.testing_utils` module in huggingface/transformers version v4.48.3 allows for a Regular Expression Denial of Service (ReDoS) attack. The regular expression used to process code blocks in docstrings contains nested quantifiers, leading to exponential backtracking when processing input with a large number of newline characters. An attacker can exploit this by providing a specially crafted payload, causing high CPU usage and potential application downtime, effectively resulting in a Denial of Service (DoS) scenario.
4.49.0
Affected by 12 other vulnerabilities.
4.50.0
Affected by 10 other vulnerabilities.
Vulnerabilities fixed by this package (0)
Vulnerability Summary Aliases
This package is not known to fix vulnerabilities.

Date Actor Action Vulnerability Source VulnerableCode Version
2026-06-13T09:57:17.724187+00:00 GHSA Importer Affected by VCID-ydge-4zba-3khn https://github.com/advisories/GHSA-qq3j-4f4f-9583 38.6.0
2026-06-13T09:48:59.161478+00:00 GHSA Importer Affected by VCID-mu2w-a71e-4bbd https://github.com/advisories/GHSA-hxxf-235m-72v3 38.6.0
2026-06-13T09:48:58.423810+00:00 GHSA Importer Affected by VCID-k7sr-ay64-syg9 https://github.com/advisories/GHSA-qxrp-vhvm-j765 38.6.0
2026-06-13T09:48:57.692817+00:00 GHSA Importer Affected by VCID-tzcs-6fp1-8yes https://github.com/advisories/GHSA-wrfc-pvp9-mr9g 38.6.0
2026-06-12T21:55:10.433129+00:00 GitLab Importer Affected by VCID-wkqx-hf5c-8kae https://gitlab.com/gitlab-org/advisories-community/-/blob/main/pypi/transformers/CVE-2026-1839.yml 38.6.0
2026-06-12T20:21:02.913911+00:00 GitLab Importer Affected by VCID-9766-62zk-zqcq https://gitlab.com/gitlab-org/advisories-community/-/blob/main/pypi/transformers/CVE-2025-6921.yml 38.6.0
2026-06-12T20:17:11.499404+00:00 GitLab Importer Affected by VCID-35kz-esn2-1yf5 https://gitlab.com/gitlab-org/advisories-community/-/blob/main/pypi/transformers/CVE-2025-6051.yml 38.6.0
2026-06-12T20:17:09.722846+00:00 GitLab Importer Affected by VCID-pvb2-bzaz-w3bv https://gitlab.com/gitlab-org/advisories-community/-/blob/main/pypi/transformers/CVE-2025-6638.yml 38.6.0
2026-06-12T20:08:38.242753+00:00 GitLab Importer Affected by VCID-v4bk-nagm-8bcs https://gitlab.com/gitlab-org/advisories-community/-/blob/main/pypi/transformers/CVE-2025-5197.yml 38.6.0
2026-06-12T20:06:43.933830+00:00 GitLab Importer Affected by VCID-ydcb-5t2c-1fen https://gitlab.com/gitlab-org/advisories-community/-/blob/main/pypi/transformers/CVE-2025-3933.yml 38.6.0
2026-06-12T20:05:46.898067+00:00 GitLab Importer Affected by VCID-dnej-1umy-qfh4 https://gitlab.com/gitlab-org/advisories-community/-/blob/main/pypi/transformers/CVE-2025-3263.yml 38.6.0
2026-06-12T20:05:45.428808+00:00 GitLab Importer Affected by VCID-c4mh-fkqh-1qe1 https://gitlab.com/gitlab-org/advisories-community/-/blob/main/pypi/transformers/CVE-2025-3264.yml 38.6.0
2026-06-12T20:05:39.260201+00:00 GitLab Importer Affected by VCID-sfgy-7173-eyby https://gitlab.com/gitlab-org/advisories-community/-/blob/main/pypi/transformers/CVE-2025-3777.yml 38.6.0
2026-06-12T20:01:54.299311+00:00 GitLab Importer Affected by VCID-ydge-4zba-3khn https://gitlab.com/gitlab-org/advisories-community/-/blob/main/pypi/transformers/CVE-2025-2099.yml 38.6.0
2026-06-12T20:00:31.420816+00:00 GitLab Importer Affected by VCID-c1ab-fktw-jud2 https://gitlab.com/gitlab-org/advisories-community/-/blob/main/pypi/transformers/CVE-2025-1194.yml 38.6.0
2026-06-12T19:55:21.927348+00:00 GitLab Importer Affected by VCID-wqd9-k9zz-1ycz https://gitlab.com/gitlab-org/advisories-community/-/blob/main/pypi/transformers/CVE-2024-12720.yml 38.6.0
2026-06-12T19:47:16.834336+00:00 GitLab Importer Affected by VCID-k7sr-ay64-syg9 https://gitlab.com/gitlab-org/advisories-community/-/blob/main/pypi/transformers/CVE-2024-11392.yml 38.6.0
2026-06-12T19:47:16.507117+00:00 GitLab Importer Affected by VCID-mu2w-a71e-4bbd https://gitlab.com/gitlab-org/advisories-community/-/blob/main/pypi/transformers/CVE-2024-11394.yml 38.6.0
2026-06-12T19:47:16.183631+00:00 GitLab Importer Affected by VCID-tzcs-6fp1-8yes https://gitlab.com/gitlab-org/advisories-community/-/blob/main/pypi/transformers/CVE-2024-11393.yml 38.6.0
2026-06-12T04:20:11.318407+00:00 Pypa Importer Affected by VCID-ydge-4zba-3khn https://github.com/pypa/advisory-database/blob/main/vulns/transformers/PYSEC-2025-40.yaml 38.6.0
2026-06-12T04:19:44.037181+00:00 Pypa Importer Affected by VCID-mu2w-a71e-4bbd https://github.com/pypa/advisory-database/blob/main/vulns/transformers/PYSEC-2024-229.yaml 38.6.0
2026-06-12T04:19:43.393526+00:00 Pypa Importer Affected by VCID-tzcs-6fp1-8yes https://github.com/pypa/advisory-database/blob/main/vulns/transformers/PYSEC-2024-228.yaml 38.6.0
2026-06-12T04:19:42.770546+00:00 Pypa Importer Affected by VCID-k7sr-ay64-syg9 https://github.com/pypa/advisory-database/blob/main/vulns/transformers/PYSEC-2024-227.yaml 38.6.0
2026-06-11T21:03:39.902933+00:00 PyPI Importer Affected by VCID-mu2w-a71e-4bbd https://osv-vulnerabilities.storage.googleapis.com/PyPI/all.zip 38.6.0
2026-06-11T21:03:39.233359+00:00 PyPI Importer Affected by VCID-tzcs-6fp1-8yes https://osv-vulnerabilities.storage.googleapis.com/PyPI/all.zip 38.6.0
2026-06-11T21:03:38.554451+00:00 PyPI Importer Affected by VCID-k7sr-ay64-syg9 https://osv-vulnerabilities.storage.googleapis.com/PyPI/all.zip 38.6.0