CVE-2026-80047 json
Hugging Face Transformers library writes remote code to disk prior to consent check
published 2026-09-01 2 mo ago modified 2026-10-01 38 d ago also GHSA-x9r9-c232-4q39 , PYSEC-2026-4174 , EUVD-2026-69144
- cvss
- 7.8
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.1%
- EPSS 0.1% chance of exploitation in 30 days, percentile 0%
- public exploits
- 0
- none known
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.
Patch / fix
- github.com/huggingface/transformers@cbc1651 commit
- github.com/huggingface/transformers#48620 pull request
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2026-80047 updated cvss 6.5
transformers: Hugging Face Transformers: Unauthorized file write via GenerativePreTrainedModel.load_custom_generate()
-
Red Hat Lightspeed Core lightspeed-core/rag-tool-cpu-rhel9, lightspeed-core/lightspeed-stack-rhel9, lightspeed-core/rag-tool-cuda-12.9-rhel9 Red Hat OpenShift Lightspeed openshift-lightspeed/lightspeed-ocp-rag-rhel9, openshift-lightspeed/lightspeed-service-api-rhel9, openshift-lightspeed-tech-preview/lightspeed-rag-tool-rhel9 Red Hat AI Inference Server rhaii/vllm-cpu-rhel9, rhaii/vllm-tpu-rhel9, rhaii/vllm-cuda-rhel9, rhaii/vllm-rocm-rhel9, rhaiis/vllm-cpu-rhel9, rhaiis/vllm-tpu-rhel9, +9 more Red Hat Ansible Automation Platform 2 ansible-automation-platform-25/lightspeed-chatbot-rhel8, ansible-automation-platform-26/lightspeed-chatbot-rhel9, ansible-automation-platform-27/lightspeed-chatbot-rhel9 Red Hat Enterprise Linux AI (RHEL AI) 3 rhelai3/bootc-cuda-rhel9, rhelai3/bootc-rocm-rhel9, rhelai3/bootc-gaudi-rhel9, rhelai3/bootc-aws-cuda-rhel9, rhelai3/bootc-gcp-cuda-rhel9, rhelai3/disk-image-cuda-rhel9, +2 more Red Hat OpenShift AI (RHOAI) rhai/guidellm-rhel9, rhoai/odh-automl-rhel9, rhoai/odh-autorag-rhel9, rhoai/odh-ogx-core-rhel9, rhoai/odh-caikit-nlp-rhel9, rhoai/odh-vllm-gaudi-rhel9, +37 moreaffected: workaround, no fix available “Fix deferred”
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- total
- Assessed
- 2 mo ago
Exploit prediction
0.10% chance of exploitation in the next 30 days, higher than 0% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CISA ADP | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| CNA | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| GitHub | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| OSV | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | transformers | >=4.49.0, <=5.8.1 |
no fix listed |
Affected products
- Hugging Face Transformers
Classification
References
-
github.com
/huggingface/transformers/pull/48620
web
-
github.com
/huggingface/transformers/commit/cbc1651a032b923da7f4b44b3d0e6f68e6ba6b55
web
-
github.com
/huggingface/transformers
package
-
kb.cert.org
/vuls/id/456290
web
-
kb.cert.org
/vuls/id/456290
web
-
nvd.nist.gov
/vuln/detail/CVE-2026-80047
advisory
-
pypi.org
/project/transformers
package
-
github.com
/advisories/GHSA-x9r9-c232-4q39
advisory
Sources
- CVE List CVE-2026-80047
- GitHub Advisory GHSA-x9r9-c232-4q39
- NVD CVE-2026-80047
- OSV PYSEC-2026-4174
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.