Last seen May 26, 2026

HuggingFace Remote Code Execution Vulnerability

Evidence indicates that HuggingFace is affected by remote code execution. Reported affected versions include 5.3.0.

Technical Severity
Medium severity
Lifecycle Status

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

My Interests Exposure

Exposure unknown

Recommended Response
Last Seen

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:

Remote Code ExecutionvulnerabilityHuggingFacehuggingface/transformerstransformersversion

Timeline

  • Incident first seen
    May 26, 2026 19:00

    BugSkan first recorded this incident.

  • HuggingFace transformers vulnerable to remote code execution
    May 26, 2026 19:00

    OSV.dev ยท Vulnerability

  • HuggingFace transformers vulnerable to remote code execution
    May 26, 2026 19:00

    GitHub Advisory Database ยท Vulnerability

Sources

HuggingFace transformers vulnerable to remote code execution

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 source
HuggingFace transformers vulnerable to remote code execution

GitHub 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 source

My Interests Match

Want personalized relevance?

Create an account to see which incidents overlap with your interests.

โ† Back to incident intelligence