Read the docs
TI-2026-03808 Aliases CVE-2026-4372GHSA-29pf-2h5f-8g72

Arbitrary Remote Code Execution via `_attn_implementation_internal` Config Injection in huggingface/transformers

Priority LOW 37CWE-1066Published · Updated

Key facts

Attack vector
Local
Privileges required
None
User interaction
Required
Attack complexity
Low
Impact type
Code execution
Confidentiality · integrity · availability
High · High · High
Fix status
Fixed

Attack profile from CVSS 3.0 · CNA. Fix status from CNA and GitHub. Impact type from CWE-502.

Summary

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.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00696 53rd percentileScored 2026-11-07
Public exploit Yes 1 exploit referenceTagged by NVD
Fix Fixed huggingface/transformers (huggingface): 5.3.0transformers (PyPI): 5.3.0

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
Technical impact
Total

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
huggingfacehuggingface/transformersbefore 5.3.05.3.0Patch availableCNA
—transformers (PyPI)before 5.3.05.3.0Patch availableGHSA-29pf-2h5f-8g72
  • huggingface/transformers Vendorhuggingface Affected before 5.3.0 Fixed in 5.3.0 Patch available CNA
  • transformers (PyPI) Vendor— Affected before 5.3.0 Fixed in 5.3.0 Patch available GHSA-29pf-2h5f-8g72

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:huggingface:transformers:*:*:*:*:*:*:*:*before 5.3.0Vulnerablehuggingface
  • cpe:2.3:a:huggingface:transformers:*:*:*:*:*:*:*:* Versions before 5.3.0 Vulnerable ·huggingface

Remediation

  • Fix · CNA huggingface/transformers (huggingface) Fixed in 5.3.0
  • Fix · GHSA-29pf-2h5f-8g72 transformers (PyPI) Fixed in 5.3.0 Advisory →

Timeline

  1. 2026-10-02 Threatist record created from CVE-2026-4372
  2. 2026-10-03 Alias added: GHSA-29pf-2h5f-8g72
  3. 2026-10-25 EPSS moved to the 50th–90th percentile

References

  • TI-2026-04577 Policy Bypass in LightGlue Nested Config Resolution in huggingface/transformers CVSS 3.1CRITICAL 9.6
  • TI-2025-06294 Regular Expression Denial of Service (ReDoS) in huggingface/transformers CVSS 3.1HIGH 7.5
  • TI-2025-06027 Regular Expression Denial of Service (ReDoS) in huggingface/transformers CVSS 3.1HIGH 7.5
  • TI-2025-02858 Regular Expression Denial of Service (ReDoS) in huggingface/transformers CVSS 3.1HIGH 7.5
  • TI-2025-01837 Regular Expression Denial of Service (ReDoS) in huggingface/transformers CVSS 3.1HIGH 7.5
  • TI-2024-11793 Regular Expression Denial of Service (ReDoS) in huggingface/transformers CVSS 3.1HIGH 7.5
See all 29 →

Sources