CVE Watchtower

CVE-2026-4372Huggingface Transformers

NVDCVSS scored by security@huntr.dev

Vulnerability 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.
Severity Level
HIGH(7.8)
Published Date
May 24, 2026
Last Modified
Jul 23, 2026
Exploitation Status
Public exploit available
EPSS Score (30-Day)
0.48%Probability
Root Weakness (CWE)
See the MITRE CWE entry for the full definition of this weakness.
The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.
CVSS v3.0 Base Metrics — Score 7.8 (HIGH)
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Attack VectorLocal
Attack ComplexityLow
Privileges RequiredNone
User InteractionRequired
ScopeUnchanged
ConfidentialityHigh
IntegrityHigh
AvailabilityHigh

Affected & Patched Versions

Affected Versions
  • Huggingface Transformers < 5.3.0
  • huggingface/transformers >= unspecified and < 5.3.0
Patched Versions
  • Huggingface Transformers 5.3.0
  • huggingface/transformers 5.3.0

What to do

Prioritize this fix. Exploit code is public, so attacks can follow quickly.

  1. Check whether you run Huggingface Transformers and which version.
  2. Update to a patched version listed above, then confirm the new version.
  3. Review logs and exposed services for signs of earlier compromise.

Timeline

  • May 24, 2026Published
  • Jul 23, 2026Record last modified

Score, severity and exploitation changes are tracked from the day Watchtower started logging them.

Get notified about new Huggingface Transformers CVEsYou are reading CVE-2026-4372. Get an email when KEV listings, exploits or new CVEs match your stack.
Set up CVE alerts

More Huggingface Transformers CVEs

Data last checked: Nov 22, 2026 17:11 UTC