# transformers (PyPI)

Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training.

- Latest: 5.25.1 (2026-12-02)
- Licence: Apache 2.0 License
- Downloads: 120447468 last month
- Advisories on the latest version: 0

- CVE-2026-80047 : Hugging Face Transformers downloads custom generation code before trust consent
- CVE-2026-9856 : Transformers save_pretrained path traversal allows arbitrary file writes through chat template names Fixed in 5.10.0.
- CVE-2026-80047 HIGH: Hugging Face Transformers downloads custom generation code before trust consent
- CVE-2026-9856 HIGH: Transformers save_pretrained path traversal allows arbitrary file writes through chat template names Fixed in 5.10.0.
- CVE-2025-3933 : Transformers is vulnerable to ReDoS attack through its DonutProcessor class Fixed in 4.52.1.
- CVE-2024-3568 : Transformers Deserialization of Untrusted Data vulnerability Fixed in 4.38.0.
- CVE-2025-3262 : Transformers vulnerable to ReDoS attack through its SETTING_RE variable Fixed in 4.51.0.
- CVE-2025-6921 : Hugging Face Transformers vulnerable to Regular Expression Denial of Service (ReDoS) in the AdamWeightDecay optimizer Fixed in 4.53.0.
- CVE-2025-6638 : Hugging Face Transformers is vulnerable to ReDoS through its MarianTokenizer Fixed in 4.53.0.
- CVE-2024-12720 : Transformers Regular Expression Denial of Service (ReDoS) vulnerability Fixed in 4.48.0.
- CVE-2025-5197 : Hugging Face Transformers Regular Expression Denial of Service (ReDoS) vulnerability Fixed in 4.53.0.
- CVE-2025-1194 : Transformers Regular Expression Denial of Service (ReDoS) vulnerability Fixed in 4.50.0.
- CVE-2025-3264 : Transformers vulnerable to ReDoS attack through its get_imports() function Fixed in 4.51.0.
- CVE-2025-3777 : Transformers's Improper Input Validation vulnerability can be exploited through username injection Fixed in 4.52.1.
- CVE-2025-3263 : Transformers's ReDoS vulnerability in get_configuration_file can lead to catastrophic backtracking Fixed in 4.51.0.
- CVE-2025-6051 : Hugging Face Transformers library has Regular Expression Denial of Service Fixed in 4.53.0.
- CVE-2026-5241 HIGH: huggingface/transformers: Arbitrary Code Execution During Model Initialization in the LightGlue Model Loading Path Fixed in 5.5.0.
- CVE-2026-5241 : 
- CVE-2026-4372 HIGH: HuggingFace transformers vulnerable to remote code execution Fixed in 5.3.0.
- CVE-2026-4372 :  Fixed in 5.3.0.
- CVE-2026-1839 MODERATE: HuggingFace Transformers allows for arbitrary code execution in the `Trainer` class Fixed in 5.0.0rc3.
- CVE-2026-1839 :  Fixed in 5.0.0.
- CVE-2025-14920 : 
- CVE-2025-14921 : 
- CVE-2025-14924 : 
- CVE-2025-14926 : 
- CVE-2025-14927 : 
- CVE-2025-14928 : 
- CVE-2025-14929 : 
- CVE-2025-14930 : 
- CVE-2025-6921 MODERATE: Hugging Face Transformers vulnerable to Regular Expression Denial of Service (ReDoS) in the AdamWeightDecay optimizer Fixed in 4.53.0.
- CVE-2025-6051 MODERATE: Hugging Face Transformers library has Regular Expression Denial of Service Fixed in 4.53.0.
- CVE-2025-6638 MODERATE: Hugging Face Transformers is vulnerable to ReDoS through its MarianTokenizer Fixed in 4.53.0.
- CVE-2025-5197 MODERATE: Hugging Face Transformers Regular Expression Denial of Service (ReDoS) vulnerability Fixed in 4.53.0.
- CVE-2025-3933 MODERATE: Transformers is vulnerable to ReDoS attack through its DonutProcessor class Fixed in 4.52.1.
- CVE-2025-3262 MODERATE: Transformers vulnerable to ReDoS attack through its SETTING_RE variable Fixed in 4.51.0.
- CVE-2025-3264 MODERATE: Transformers vulnerable to ReDoS attack through its get_imports() function Fixed in 4.51.0.
- CVE-2025-3777 LOW: Transformers's Improper Input Validation vulnerability can be exploited through username injection Fixed in 4.52.1.
- CVE-2025-3263 MODERATE: Transformers's ReDoS vulnerability in get_configuration_file can lead to catastrophic backtracking Fixed in 4.51.0.
- CVE-2025-2099 MODERATE: Hugging Face Transformers Regular Expression Denial of Service Fixed in 4.50.0.

Sources: PyPI, deps.dev (CC BY 4.0), OSV. Last checked 3 Dec 2026.
