Remote code executionin Hugging Face Transformers.
Proof of concept public (GitHub).
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_implementation_internal` field set to an attacker-controlled HuggingFace Hub repository ID. When a victim loads this model using the standard `AutoModelForCausalLM.from_pretrained()` API, the library downloads and executes arbitrary Python code from the attacker's repository with the victim's full OS privileges. This issue arises due to unfiltered deserialization of configuration attributes, insufficient sanitization of internal fields, and unsandboxed execution of downloaded kernels.
- Upgrade huggingface/transformers to 5.3.0 or later.
- Upgrade transformers (PyPI) to 5.3.0 or later.
Affected and fixed versions
From the CVE record, NVD and package advisories. When no source has versions yet, this table says "not confirmed" instead of guessing.
From first report to first attacks
- 18 Mar 2026CVE ID reserved by @huntr_ai.
- 24 May 2026Published in the CVE List.
- 26 May 2026CVE record last updated.
- 14 Oct 2026First public proof of concept on GitHub.
Attack code anyone can find
Exploit maturity: Proof of concept (GitHub). CISA assessment (SSVC): exploitation none.
Listed so defenders can judge how urgent this is and test systems they are authorised to test. Patchminder does not host exploit code; links open the source page. Labels for GitHub repositories come from their public details and are never a promise about the code. Run anything only in an isolated lab.
Report a link
Other Transformers vulnerabilities
Patchminder. CVE-2026-4372: Remote code execution in Hugging Face Transformers. https://patchminder.com/cve/cve-2026-4372/ (accessed 5 December 2026).