HuggingFace Remote Code Execution Vulnerability
Evidence indicates that HuggingFace is affected by remote code execution. Reported affected versions include 5.3.0.
STABLE
What Happened
Evidence indicates that HuggingFace is affected by remote code execution. Reported affected versions include 5.3.0.
Why This Matters
The evidence matters to defenders using HuggingFace because it could let an attacker run code in affected environments.
Recommended Action
No confirmed vendor remediation is available in the current evidence. Identify deployments of HuggingFace matching the evidenced affected versions: 5.3.0.
Exposure
Exposure unknown
May 26, 2026 19:00
Exposure reason: This incident does not currently match a technology in My Interests.
Exploitation status: UNKNOWN
Affected versions: 5.3.0
Primary entities:
Timeline
-
Incident first seen
May 26, 2026 19:00BugSkan first recorded this incident.
-
HuggingFace transformers vulnerable to remote code execution
May 26, 2026 19:00OSV.dev ยท Vulnerability
-
HuggingFace transformers vulnerable to remote code execution
May 26, 2026 19:00GitHub Advisory Database ยท Vulnerability
Sources
OSV.dev ยท May 26, 2026 19:00
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. The vulnerability bypasses the `trust_remote_code` 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.
Open publisher sourceGitHub Advisory Database ยท May 26, 2026 19:00
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. The vulnerability bypasses the `trust_remote_code` 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.
Open publisher sourceMy Interests Match
Create an account to see which incidents overlap with your interests.