CVE Watchtower

CVE-2026-80047Hugging Face Transformers

NVDCVSS scored by 134c704f-9b21-4f2e-91b3-4a467353bcc0

Vulnerability Summary

A vulnerability in Hugging Face Transformers (versions 4.57.0 to 5.16.1) allows remote Python files to be written to local disk without user consent when using GenerativePreTrainedModel.load_custom_generate(). The function fetches and caches a remote module file before performing the required trust_remote_code consent check, inverting the security model enforced by other code-loading paths (such as AutoConfig, AutoModel, and AutoTokenizer). As a result, attacker‑controlled Python code from custom_generate/generate.py is copied into the user’s ~/.cache/huggingface/modules directory even if the user declines the trust prompt. Although execution is correctly gated, the file write is not reversible and can persist across sessions. This can lead to persistent, unauthorized files on disk and stale cache collisions where cached attacker code may later be executed during trusted model loads. The issue stems from an unconditional file write in dynamic_module_utils.py prior to any trust verification.
Severity Level
HIGH(7.8)
Published Date
Sep 1, 2026
Last Modified
Sep 23, 2026
Exploitation Status
No confirmed exploitation yet
EPSS Score (30-Day)
0.10%Probability
Root Weakness (CWE)
See the MITRE CWE entry for the full definition of this weakness.
The product checks the state of a resource before using that resource, but the resource state can change between the check and the use in a way that invalidates the results of the check.
See the MITRE CWE entry for the full definition of this weakness.
CVSS v3.1 Base Metrics — Score 7.8 (HIGH)
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Attack VectorLocal
Attack ComplexityLow
Privileges RequiredLow
User InteractionNone
ScopeUnchanged
ConfidentialityHigh
IntegrityHigh
AvailabilityHigh

Affected & Patched Versions

Affected Versions
  • Hugging Face Transformers >= 4.57.0 and <= 5.16.1
Patched Versions
  • Hugging Face Transformers 5.16.1

What to do

Plan remediation soon. No exploitation is confirmed yet, but the severity is high.

  1. Check whether you run Hugging Face Transformers and which version.
  2. Update to a patched version listed above, then confirm the new version.

Timeline

  • Sep 1, 2026Published
  • Sep 23, 2026Record last modified

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

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

More Hugging Face Transformers CVEs

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