CVE-2026-4372
A critical remote code execution vulnerability exists in all versions of the HuggingFace transformers library prior to version 5.3.0.
Published May 24, 2026 · updated Jul 23, 2026 · huggingface transformers
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 file containing the field set to an attacker-controlled HuggingFace Hub repository ID. When a victim loads this model using the standard 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. The vulnerability bypasses the security mechanism, is invisible to the victim, and exploits the standard documented usage pattern, making it particularly severe. Users are advised to upgrade to version 5.3.0 or later to mitigate this issue.
Code
The project this record applies to. Exploit listings stay in References.
Timeline
Detection, updates, and resolution for this record.
May 24, 2026 · NIST NVD
Detected
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 file containing the field set to an attacker-controlled HuggingFace Hub repository ID. When a victim loads this model using the standard API, the library downloads and executes arbitrary Python code from the
Jul 23, 2026 · NIST NVD
Updated
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 file containing the field set to an attacker-controlled HuggingFace Hub repository ID. When a victim loads this model using the standard API, the library downloads and executes arbitrary Python code from the
Affected
- cpe huggingface/transformersversion unspecified
Sources
- CVE.orgVulnerability recordCVE-2026-4372
Official CVE identifier
cve.org - NIST NVDVulnerability recordCVE-2026-4372
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 file containing the field set to an attack
nvd.nist.gov