7.8

CVE-2026-80047: Hugging Face Transformers library writes remote code to disk prior to consent check

Awaiting analysis
AliasesGHSA-x9r9-c232-4q39PYSEC-2026-4174CGA-2h4v-6qpp-q7r2
Published 01-09-2026Last modified 23-09-2026

Vulnerability summary

CVE-2026-80047 is a high (CVSS 7.8) Improper Check for Dropped Privileges vulnerability in hugging face transformers. EPSS estimates a 0.10% chance of exploitation in the next 30 days, higher than 0.7% of scored vulnerabilities.

Priority
Routine

Not severe (CVSS 7.8, local access); no exploitation reported by the 5 checked sources

Source freshness unavailable

How is this decided?
CVSS score
7.8/10
010
High · v3.1 (CVE.org)
EPSS score
0.10%
0%100%
Low · 0.00 pp in 30 days
KEVNot listedNot listed by any tracked catalog.
RansomwareNot flaggedNo ransomware use recorded.
Public exploits0No public exploits recorded

Timeline

  1. 01-09-2026
    PublishedVulnerability first disclosed.
  2. 23-09-2026
    Last modifiedVulnerability information updated.

Description

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.

CVSS metrics

4 scores · 4 sources · 1 version

EPSS trend

Probability

0.10%

Chance of exploitation in the next 30 days

Percentile

1%

Versus all other CVEs

30-day change

No change 0.00 pp

From 0.10% on 04-10-2026

04-10-202603-11-2026

Known exploited

Compare KEV catalogs
CISA KEV

Not in the CISA KEV catalog.

ENISA CNW

Not in the ENISA CNW catalog.

CIRCL

Not in the CIRCL catalog.

Public exploits

0 found

No public exploits indexed.

Weaknesses

CWE · root cause

Affected systems

Version check

Known conditions: local access, low-privilege account, no user interaction (CVSS vector). Other conditions: not stated in public data.

Chainguard8 products
  • py3.10-transformers-4.51All versions (No fix recorded)
  • py3.10-transformers-4.56All versions (No fix recorded)
  • py3.11-transformers-4.51All versions (No fix recorded)
  • py3.11-transformers-4.56All versions (No fix recorded)
  • py3.12-transformers-4.51All versions (No fix recorded)
Hugging face1 product
PyPI1 product
  • transformers≥ 4.49.0, ≤ 5.8.1

3 vendors · 10 products

References

9 links