transformers remote code execution Vulnerability
Evidence indicates that transformers is affected by a security issue. Reported affected versions include 5.3.0.
STABLE
What Happened
Evidence indicates that transformers is affected by a security issue. Reported affected versions include 5.3.0.
Why This Matters
Publisher reporting describes a security event affecting version. BugSkan could not yet bind a CVE or affected version, so treat the source details as the current record.
Recommended Action
Confirm whether version is present in your environment and review vendor guidance for this report. Apply available patches or mitigations if your deployment matches the described conditions.
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 sourceRelated Incidents
Other BugSkan incidents that share identifiers, products, or vendors with this report.
My Interests Match
Create an account to see which incidents overlap with your interests.