transformers
PyPI32 known CVEs affecting this package
Aggregated from OSV, GitHub Security Advisories, NVD, and vendor advisories. Each CVE links to its full detail page with vendor advisories, patches, fixed versions, and remediation guidance.
CVEs affecting transformerspage 1 of 1
- CVE-2023-2800MEDIUMCVSS 4.7EG 4.7fixed in 4.30.02023-05-18
vulnerable: 0.1 ... 0.1.2 (169 versions)
Insecure Temporary File in GitHub repository huggingface/transformers prior to 4.30.0.
- CVE-2023-6730HIGHCVSS 8.8EG 8.8fixed in 4.36.02023-12-19
vulnerable: 0.1 ... 0.1.2 (185 versions)
Deserialization of Untrusted Data in GitHub repository huggingface/transformers prior to 4.36.
- CVE-2023-7018HIGHCVSS 7.8EG 7.8fixed in 4.36.02023-12-20
vulnerable: 0.1 ... 0.1.2 (185 versions)
Deserialization of Untrusted Data in GitHub repository huggingface/transformers prior to 4.36.
- CVE-2024-11392HIGHCVSS 8.8EG 8.8fixed in 4.48.02024-11-22
vulnerable: 0.1 ... 4.9.2 (166 versions)
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 …
- CVE-2024-11393HIGHCVSS 8.8EG 8.8fixed in 4.48.02024-11-22
vulnerable: 0.1 ... 4.9.2 (166 versions)
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. …
- CVE-2024-11394HIGHCVSS 8.8EG 8.8fixed in 4.48.02024-11-22
vulnerable: 0.1 ... 4.9.2 (166 versions)
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 i…
- CVE-2024-12720HIGHCVSS 7.5EG 7.5fixed in 4.48.02025-03-20
vulnerable: 0.1 ... 4.9.2 (166 versions)
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, wher…
- CVE-2024-3568CRITICALCVSS 9.6EG 9.6fixed in 4.38.02024-04-10
vulnerable: 0.1 ... 4.9.2 (131 versions)
The huggingface/transformers library is vulnerable to arbitrary code execution through deserialization of untrusted data within the `load_repo_checkpoint()` function of the `TFPreTrainedModel()` class. Attackers can execute arbitrary code …
- CVE-2025-1194MEDIUMCVSS 6.5EG 6.5fixed in 4.50.02025-04-29
vulnerable: 0.1 ... 4.9.2 (171 versions)
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 t…
- CVE-2025-14920HIGHCVSS 7.8EG 7.82025-12-23
vulnerable: 0.1 ... 4.9.2 (190 versions)
Hugging Face Transformers Perceiver 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. U…
- CVE-2025-14921HIGHCVSS 7.8EG 7.82025-12-23
vulnerable: 0.1 ... 4.9.2 (190 versions)
Hugging Face Transformers Transformer-XL Model Deserialization of Untrusted Data Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of Hugging Face Transforme…
- CVE-2025-14924HIGHCVSS 7.8EG 7.82025-12-23
vulnerable: 0.1 ... 4.9.2 (191 versions)
Hugging Face Transformers megatron_gpt2 Deserialization of Untrusted Data Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of Hugging Face Transformers. Use…
- CVE-2025-14926HIGHCVSS 7.8EG 7.82025-12-23
vulnerable: 0.1 ... 4.9.2 (199 versions)
Hugging Face Transformers SEW convert_config Code Injection Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of Hugging Face Transformers. User interaction …
- CVE-2025-14927HIGHCVSS 7.8EG 7.82025-12-23
vulnerable: 0.1 ... 4.9.2 (199 versions)
Hugging Face Transformers SEW-D convert_config Code Injection Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of Hugging Face Transformers. User interactio…
- CVE-2025-14928HIGHCVSS 7.8EG 7.82025-12-23
vulnerable: 0.1 ... 4.9.2 (199 versions)
Hugging Face Transformers HuBERT convert_config Code Injection Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of Hugging Face Transformers. User interacti…
- CVE-2025-14929HIGHCVSS 7.8EG 7.82025-12-23
vulnerable: 0.1 ... 5.0.0rc0 (206 versions)
Hugging Face Transformers X-CLIP Checkpoint Conversion Deserialization of Untrusted Data Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of Hugging Face Tr…
- CVE-2025-14930HIGHCVSS 7.8EG 7.82025-12-23
vulnerable: 0.1 ... 4.9.2 (200 versions)
Hugging Face Transformers GLM4 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 interac…
- CVE-2025-2099HIGHCVSS 7.5EG 7.5fixed in 4.50.0 or 4.49.0, by version range2025-05-19
vulnerable: 0.1 ... 0.1.2 (233 versions)
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 p…
- CVE-2025-3262HIGHCVSS 7.5EG 7.5fixed in 4.51.02025-07-07
vulnerable: 4.49.0, 4.50.0, 4.50.1, 4.50.2, 4.50.3
A Regular Expression Denial of Service (ReDoS) vulnerability was discovered in the huggingface/transformers repository, specifically in version 4.49.0. The vulnerability is due to inefficient regular expression complexity in the `SETTING_R…
- CVE-2025-3263MEDIUMCVSS 5.3EG 5.3fixed in 4.51.02025-07-07
vulnerable: 0.1 ... 4.9.2 (175 versions)
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 affecte…
- CVE-2025-3264MEDIUMCVSS 5.3EG 5.3fixed in 4.51.02025-07-07
vulnerable: 0.1 ... 4.9.2 (175 versions)
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…
- CVE-2025-3777LOWCVSS 3.5EG 3.5fixed in 4.52.12025-07-07
vulnerable: 0.1 ... 4.9.2 (180 versions)
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 by…
- CVE-2025-3933MEDIUMCVSS 5.3EG 5.3fixed in 4.52.12025-07-11
vulnerable: 0.1 ... 4.9.2 (180 versions)
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 earl…
- CVE-2025-5197MEDIUMCVSS 5.3EG 5.3fixed in 4.53.02025-08-06
vulnerable: 0.1 ... 4.9.2 (184 versions)
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 w…
- CVE-2025-6051MEDIUMCVSS 5.3EG 5.3fixed in 4.53.02025-09-14
vulnerable: 0.1 ... 4.9.2 (184 versions)
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 version…
- CVE-2025-6638HIGHCVSS 7.5EG 7.5fixed in 4.53.02025-09-12
vulnerable: 0.1 ... 4.9.2 (184 versions)
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.…
- CVE-2025-6921HIGHCVSS 7.5EG 7.5fixed in 4.53.02025-09-23
vulnerable: 0.1 ... 4.9.2 (184 versions)
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 …
- CVE-2026-1839HIGHCVSS 7.8EG 7.8fixed in 5.0.0rc3 or 5.0.0, by version range2026-04-07
vulnerable: 0.1 ... 5.0.0rc3 (209 versions)
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 th…
- CVE-2026-4372HIGHCVSS 7.8EG 7.8fixed in 5.3.02026-05-24
vulnerable: 0.1 ... 5.2.0 (212 versions)
A critical remote code execution vulnerability exists in all versions of the HuggingFace transformers library prior to version 5.3.0. The vulnerability allows an attacker to craft a malicious `config.json` file containing the `_attn_implem…
- CVE-2026-5241CRITICALCVSS 9.6EG 9.6fixed in 5.5.02026-06-03
vulnerable: 0.1 ... 5.2.0 (212 versions)
A vulnerability in the LightGlue model loading path of huggingface/transformers version 5.2.0 allows an attacker-controlled model repository to execute arbitrary code during model initialization. The issue arises because the `trust_remote_…
- CVE-2026-80047HIGHCVSS 7.8EG 7.82026-09-01
vulnerable: 4.49.0 ... 5.8.1 (55 versions)
A vulnerability in Hugging Face Transformers (versions 4.57.0 to 5.16.1) allows remote Python files to be written to local disk without user consent when using GenerativePreTrainedModel.load_custom_generate(). The function fetches and cach…
- CVE-2026-9856HIGHCVSS 7.1EG 7.1fixed in 5.10.02026-08-02
vulnerable: 0.1 ... 5.9.0 (226 versions)
A vulnerability in huggingface/transformers versions <=5.8.0.dev0 allows an attacker to perform arbitrary file writes via path traversal. The issue resides in the `save_pretrained()` methods of `PreTrainedTokenizerBase` and `ProcessorMixin…
Check whether transformers is used in your infrastructure
EchelonGraph scans your cloud and SBOMs to map every package to your actual deployments. See blast radius for transformers CVEs against the assets you own.
Book a Demo →