PyPI (Python)Worst: Critical24 advisories
transformers: known vulnerabilities
transformers has 24 reviewed security advisories in the GitHub Advisory Database — 1 critical, 8 high, 13 moderate, 2 low. The most recent was published 2026-09-01. Each one below lists the affected version range, the release that fixes it, its CVE and severity. SkyShield matches these against the transformers versions running across your servers, containers and images, and ranks what to patch first.
How to fix transformers
Upgrade transformers to a release at or above the fixed version shown for each advisory below. For PyPI (Python):
pip install --upgrade transformers (pin transformers>=5.10.0)
SkyShield checks the installed version on every machine and container, so you can see which hosts are still on an affected release after you roll the fix out.
Advisories (24)
Hugging Face Transformers downloads custom generation code before trust consent
High 7.8 CWE-273
— Affected: 4.49.0 through 5.8.1. No fixed release is listed. Published 2026-09-01. GHSA-x9r9-c232-4q39 · CVE-2026-80047
Transformers save_pretrained path traversal allows arbitrary file writes through chat template names
High 7.1 CWE-22
— Affected: before 5.10.0. Fixed in 5.10.0. Published 2026-08-02. GHSA-xrqw-3rrv-vx5w · CVE-2026-9856
huggingface/transformers: Arbitrary Code Execution During Model Initialization in the LightGlue Model Loading Path
High 8.0 CWE-829
— Affected: before 5.5.0. Fixed in 5.5.0. Published 2026-06-03. GHSA-fgcw-684q-jj6r · CVE-2026-5241
HuggingFace transformers vulnerable to remote code execution
High 7.8 CWE-1066 CWE-502
— Affected: before 5.3.0. Fixed in 5.3.0. Published 2026-05-24. GHSA-29pf-2h5f-8g72 · CVE-2026-4372
HuggingFace Transformers allows for arbitrary code execution in the `Trainer` class
Moderate 6.5 CWE-502
— Affected: before 5.0.0rc3. Fixed in 5.0.0rc3. Published 2026-04-07. GHSA-69w3-r845-3855 · CVE-2026-1839
Hugging Face Transformers vulnerable to Regular Expression Denial of Service (ReDoS) in the AdamWeightDecay optimizer
Moderate 5.3 CWE-400
— Affected: before 4.53.0. Fixed in 4.53.0. Published 2025-09-23. GHSA-4w7r-h757-3r74 · CVE-2025-6921
Hugging Face Transformers library has Regular Expression Denial of Service
Moderate 5.3 CWE-1333
— Affected: before 4.53.0. Fixed in 4.53.0. Published 2025-09-14. GHSA-rcv9-qm8p-9p6j · CVE-2025-6051
Hugging Face Transformers is vulnerable to ReDoS through its MarianTokenizer
Moderate 5.3 CWE-1333
— Affected: before 4.53.0. Fixed in 4.53.0. Published 2025-09-12. GHSA-59p9-h35m-wg4g · CVE-2025-6638
Hugging Face Transformers Regular Expression Denial of Service (ReDoS) vulnerability
Moderate 5.3 CWE-1333
— Affected: before 4.53.0. Fixed in 4.53.0. Published 2025-08-06. GHSA-9356-575x-2w9m · CVE-2025-5197
Transformers is vulnerable to ReDoS attack through its DonutProcessor class
Moderate 5.3 CWE-1333
— Affected: before 4.52.1. Fixed in 4.52.1. Published 2025-07-11. GHSA-37mw-44qp-f5jm · CVE-2025-3933
Transformers vulnerable to ReDoS attack through its SETTING_RE variable
Moderate 5.3 CWE-1333
— Affected: from 4.49.0 up to 4.51.0. Fixed in 4.51.0. Published 2025-07-07. GHSA-489j-g2vx-39wf · CVE-2025-3262
Transformers vulnerable to ReDoS attack through its get_imports() function
Moderate 5.3 CWE-1333
— Affected: before 4.51.0. Fixed in 4.51.0. Published 2025-07-07. GHSA-jjph-296x-mrcr · CVE-2025-3264
Transformers's Improper Input Validation vulnerability can be exploited through username injection
Low 3.5 CWE-20
— Affected: before 4.52.1. Fixed in 4.52.1. Published 2025-07-07. GHSA-phhr-52qp-3mj4 · CVE-2025-3777
Transformers's ReDoS vulnerability in get_configuration_file can lead to catastrophic backtracking
Moderate 5.3 CWE-1333
— Affected: before 4.51.0. Fixed in 4.51.0. Published 2025-07-07. GHSA-q2wp-rjmx-x6x9 · CVE-2025-3263
Hugging Face Transformers Regular Expression Denial of Service
Moderate 5.3 CWE-1333
— Affected: before 4.50.0. Fixed in 4.50.0. Published 2025-05-19. GHSA-qq3j-4f4f-9583 · CVE-2025-2099
Transformers Regular Expression Denial of Service (ReDoS) vulnerability
Moderate 4.3 CWE-1333
— Affected: before 4.50.0. Fixed in 4.50.0. Published 2025-04-29. GHSA-fpwr-67px-3qhx · CVE-2025-1194
Transformers Regular Expression Denial of Service (ReDoS) vulnerability
Moderate 5.3 CWE-1333
— Affected: before 4.48.0. Fixed in 4.48.0. Published 2025-03-20. GHSA-6rvg-6v2m-4j46 · CVE-2024-12720
Deserialization of Untrusted Data in Hugging Face Transformers
High 8.8 CWE-502
— Affected: before 4.48.0. Fixed in 4.48.0. Published 2024-11-22. GHSA-hxxf-235m-72v3 · CVE-2024-11394
Deserialization of Untrusted Data in Hugging Face Transformers
High 7.5 CWE-502
— Affected: before 4.48.0. Fixed in 4.48.0. Published 2024-11-22. GHSA-qxrp-vhvm-j765 · CVE-2024-11392
Deserialization of Untrusted Data in Hugging Face Transformers
High 8.8 CWE-502
— Affected: before 4.48.0. Fixed in 4.48.0. Published 2024-11-22. GHSA-wrfc-pvp9-mr9g · CVE-2024-11393
Transformers Deserialization of Untrusted Data vulnerability
Low 3.4 CWE-502
— Affected: before 4.38.0. Fixed in 4.38.0. Published 2024-04-10. GHSA-37q5-v5qm-c9v8 · CVE-2024-3568
transformers has a Deserialization of Untrusted Data vulnerability
High 7.8 CWE-502
— Affected: before 4.36.0. Fixed in 4.36.0. Published 2023-12-20. GHSA-v68g-wm8c-6x7j · CVE-2023-7018
transformers has a Deserialization of Untrusted Data vulnerability
Critical 9.0 CWE-502
— Affected: before 4.36.0. Fixed in 4.36.0. Published 2023-12-19. GHSA-3863-2447-669p · CVE-2023-6730
transformers has Insecure Temporary File
Moderate 4.7 CWE-377
— Affected: before 4.30.0. Fixed in 4.30.0. Published 2023-05-18. GHSA-282v-666c-3fvg · CVE-2023-2800
Find transformers across your fleet
Install one agent per server and connect your cloud. SkyShield matches your packages and images against GHSA,
CISA KEV and EPSS and shows the fix per machine. Free for one server, then from $49 per server a month.
Start free.