Last seen May 26, 2026

transformers remote code execution Vulnerability

Evidence indicates that transformers is affected by a security issue. Reported affected versions include 5.3.0.

Technical Severity
Medium severity
Lifecycle Status

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

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:

HuggingFacetransformersRemote Code Executionvulnerabilityhuggingface/transformersversion

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

Other BugSkan incidents that share identifiers, products, or vendors with this report.

My Interests Match

Want personalized relevance?

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

โ† Back to incident intelligence