Skip to content

transformers

24 advisories in the AI Sec Watch database name transformers (PyPI). transformers (PyPI) has declared an LLM component as a dependency since 2016-08-17. The most recent advisory that names transformers and states a fix gives 5.10.0.

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.

The first release to declare it was version 0.1.

PyPILatest 5.23.0First release 2016-08-17Registry pageRepositoryChecked 2026-11-21

Advisories

Advisories that name transformers as affected and state PyPI as its ecosystem. For a version-exact check of your own dependencies, use Stack Check.

Time to fix: a median of −59 days from disclosure to the release of the fixed version, over 23 advisories with a dated fix (fastest −93, slowest +48 days). A negative count means the fix was released before the advisory's disclosure date.

AdvisorySeverityAffectedFixed inFix releasedPublished
CVE-2026-80047Hugging Face Transformers writes remote Python files to disk before trust checkMedium>= 4.49.0, <= 5.8.12026-09-01
CVE-2026-9856huggingface/transformers path traversal in save_pretrained via chat_templateHigh< 5.10.05.10.02026-06-03 (−60 d)2026-08-02
CVE-2026-5241GHSA-fgcw-684q-jj6r: huggingface/transformers: Arbitrary Code Execution During Model Initialization in the LightGlue Model Loading PathHigh< 5.5.05.5.02026-04-02 (−62 d)2026-06-03
CVE-2026-4372GHSA-29pf-2h5f-8g72: HuggingFace transformers vulnerable to remote code executionHigh< 5.3.05.3.02026-03-04 (−83 d)2026-05-26
CVE-2026-1839HuggingFace Transformers Trainer arbitrary code execution via torch.loadHigh< 5.0.0rc35.0.0rc32026-01-14 (−83 d)2026-04-07
CVE-2025-6921huggingface/transformers ReDoS in AdamWeightDecay optimizer via regex patternsHigh< 4.53.04.53.02025-06-26 (−89 d)2025-09-23
CVE-2025-6051Hugging Face Transformers ReDoS in EnglishNormalizer normalize_numbers methodMedium< 4.53.04.53.02025-06-26 (−80 d)2025-09-14
CVE-2025-6638Hugging Face Transformers ReDoS in MarianTokenizer remove_language_codeHigh< 4.53.04.53.02025-06-26 (−78 d)2025-09-12
CVE-2025-5197Hugging Face Transformers ReDoS in TensorFlow to PyTorch weight name conversionMedium< 4.53.04.53.02025-06-26 (−41 d)2025-08-06
CVE-2025-3933Hugging Face Transformers ReDoS in DonutProcessor token2json methodMedium<= 4.51.34.52.12025-05-20 (−52 d)2025-07-11
CVE-2025-3777Hugging Face Transformers improper URL validation in image_utils.pyMedium< 4.52.14.52.12025-05-20 (−48 d)2025-07-07
CVE-2025-3264Hugging Face Transformers ReDoS in get_imports() regex parsingMedium< 4.51.04.51.02025-04-05 (−93 d)2025-07-07
CVE-2025-3263Hugging Face Transformers ReDoS in get_configuration_file()Medium< 4.51.04.51.02025-04-05 (−93 d)2025-07-07
CVE-2025-3262huggingface/transformers ReDoS in SETTING_RE regex in chat.pyHigh>= 4.49.0, < 4.51.04.51.02025-04-05 (−93 d)2025-07-07
CVE-2025-2099transformers preprocess_string ReDoS through crafted docstring inputHigh< 4.50.04.50.02025-03-21 (−59 d)2025-05-19
CVE-2025-1194huggingface/transformers ReDoS in GPT-NeoX-Japanese tokenizer via crafted inputMedium< 4.50.04.50.02025-03-21 (−39 d)2025-04-29
CVE-2024-12720huggingface/transformers ReDoS in post_process_single()High< 4.48.04.48.02025-01-10 (−69 d)2025-03-20
CVE-2024-11394Hugging Face Transformers Trax model deserialization remote code executionHigh>= 0, < 4.48.04.48.02025-01-10 (+48 d)2024-11-23
CVE-2024-11393Hugging Face Transformers MaskFormer deserialization flaw enables code executionHigh>= 0, < 4.48.04.48.02025-01-10 (+48 d)2024-11-23
CVE-2024-11392Hugging Face Transformers MobileViTV2 deserialization leads to code executionHigh>= 0, < 4.48.04.48.02025-01-10 (+48 d)2024-11-23
CVE-2024-3568huggingface/transformers arbitrary code execution via untrusted deserializationCritical< 4.38.04.38.02024-02-21 (−49 d)2024-04-10
CVE-2023-7018huggingface/transformers deserialization of untrusted dataHigh< 4.36.04.36.02023-12-11 (−9 d)2023-12-20
CVE-2023-6730huggingface/transformers deserialization of untrusted dataHigh< 4.36.04.36.02023-12-11 (−8 d)2023-12-19
CVE-2023-2800huggingface/transformers insecure temporary fileMedium< 4.30.04.30.02023-06-08 (+21 d)2023-05-18

Dependencies of the latest release

As declared in PyPI metadata for version 5.23.0. Optional extras are listed with their extra name.

Tracked packages that depend on it

Among the packages in the registry; not every dependent on PyPI.