transformers: known vulnerabilities and the safe version
The version to be on
Version 5.10.0 or later fixes every vulnerability on this page that has a recorded fix.
Upgrade transformers with pip
pip install --upgrade "transformers>=5.10.0"
pip show transformers | grep VersionPin it in requirements.txt
transformers>=5.10.0Check the release notes before a large jump in version. Newer vulnerabilities may have been found since this page was updated.
Watch transformers
Get an email only when transformers has a new vulnerability record. Unsubscribe with one click.
Badge for your README
Shows the number of known critical and high vulnerabilities in transformers and the version that fixes them. It updates by itself.
Markdown
[](https://securityelites.com/ai-vulnerabilities/package/transformers/)All records
- Hugging Face Transformers downloads custom generation code before trust consentUnknown · CVE-2026-80047 · no fix recorded · 1 Sep 2026
- Transformers save_pretrained path traversal allows arbitrary file writes through chat template namesUnknown · CVE-2026-9856 · fixed in 5.10.0 · 3 Aug 2026
- huggingface/transformers: Arbitrary Code Execution During Model Initialization in the LightGlue Model Loadi…Unknown · CVE-2026-5241 · no fix recorded · 3 Jun 2026
- HuggingFace transformers vulnerable to remote code executionUnknown · CVE-2026-4372 · fixed in 5.3.0 · 26 May 2026
- HuggingFace Transformers allows for arbitrary code execution in the `Trainer` classUnknown · CVE-2026-1839 · fixed in 5.0.0 · 7 Apr 2026
- Hugging Face Transformers HuBERT convert_config Code Injection Remote Code Execution Vulnerability. This vulneUnknown · CVE-2025-14928 · no fix recorded · 24 Dec 2025
- Hugging Face Transformers X-CLIP Checkpoint Conversion Deserialization of Untrusted Data Remote Code ExecutionUnknown · CVE-2025-14929 · no fix recorded · 24 Dec 2025
- Hugging Face Transformers GLM4 Deserialization of Untrusted Data Remote Code Execution Vulnerability. This vulUnknown · CVE-2025-14930 · no fix recorded · 24 Dec 2025
- Hugging Face Transformers Perceiver Model Deserialization of Untrusted Data Remote Code Execution VulnerabilitUnknown · CVE-2025-14920 · no fix recorded · 24 Dec 2025
- Hugging Face Transformers Transformer-XL Model Deserialization of Untrusted Data Remote Code Execution VulneraUnknown · CVE-2025-14921 · no fix recorded · 24 Dec 2025
- Hugging Face Transformers megatron_gpt2 Deserialization of Untrusted Data Remote Code Execution Vulnerability.Unknown · CVE-2025-14924 · no fix recorded · 24 Dec 2025
- Hugging Face Transformers SEW convert_config Code Injection Remote Code Execution Vulnerability. This vulnerabUnknown · CVE-2025-14926 · no fix recorded · 24 Dec 2025
- Hugging Face Transformers SEW-D convert_config Code Injection Remote Code Execution Vulnerability. This vulnerUnknown · CVE-2025-14927 · no fix recorded · 24 Dec 2025
- Hugging Face Transformers vulnerable to Regular Expression Denial of Service (ReDoS) in the AdamWeightDecay…Unknown · CVE-2025-6921 · fixed in 4.53.0 · 23 Sep 2025
- Hugging Face Transformers library has Regular Expression Denial of ServiceUnknown · CVE-2025-6051 · fixed in 4.53.0 · 15 Sep 2025
- Hugging Face Transformers is vulnerable to ReDoS through its MarianTokenizerUnknown · CVE-2025-6638 · fixed in 4.53.0 · 12 Sep 2025
- Hugging Face Transformers Regular Expression Denial of Service (ReDoS) vulnerabilityUnknown · CVE-2025-5197 · fixed in 4.53.0 · 6 Aug 2025
- Transformers is vulnerable to ReDoS attack through its DonutProcessor classUnknown · CVE-2025-3933 · fixed in 4.52.1 · 11 Jul 2025
- Transformers vulnerable to ReDoS attack through its SETTING_RE variableUnknown · CVE-2025-3262 · fixed in 4.51.0 · 7 Jul 2025
- Transformers vulnerable to ReDoS attack through its get_imports() functionUnknown · CVE-2025-3264 · fixed in 4.51.0 · 7 Jul 2025
- Transformers's Improper Input Validation vulnerability can be exploited through username injectionUnknown · CVE-2025-3777 · fixed in 4.52.1 · 7 Jul 2025
- Transformers's ReDoS vulnerability in get_configuration_file can lead to catastrophic backtrackingUnknown · CVE-2025-3263 · fixed in 4.51.0 · 7 Jul 2025
- Hugging Face Transformers Regular Expression Denial of ServiceUnknown · CVE-2025-2099 · fixed in 4.49.0 · 19 May 2025
- Transformers Regular Expression Denial of Service (ReDoS) vulnerabilityUnknown · CVE-2025-1194 · fixed in 4.50.0 · 29 Apr 2025
- Transformers Regular Expression Denial of Service (ReDoS) vulnerabilityUnknown · CVE-2024-12720 · fixed in 4.48.0 · 20 Mar 2025
- Deserialization of Untrusted Data in Hugging Face TransformersUnknown · CVE-2024-11392 · fixed in 4.48.0 · 23 Nov 2024
- Deserialization of Untrusted Data in Hugging Face TransformersUnknown · CVE-2024-11393 · fixed in 4.48.0 · 23 Nov 2024
- Deserialization of Untrusted Data in Hugging Face TransformersUnknown · CVE-2024-11394 · fixed in 4.48.0 · 23 Nov 2024
- Transformers Deserialization of Untrusted Data vulnerabilityUnknown · CVE-2024-3568 · fixed in 4.38.0 · 11 Apr 2024
- transformers has a Deserialization of Untrusted Data vulnerabilityUnknown · CVE-2023-7018 · fixed in 4.36.0 · 21 Dec 2023
- transformers has a Deserialization of Untrusted Data vulnerabilityUnknown · CVE-2023-6730 · fixed in 4.36.0 · 19 Dec 2023
- transformers has Insecure Temporary FileUnknown · CVE-2023-2800 · fixed in 4.30.0 · 19 May 2023