CVE-2026-80047

Source
https://cve.org/CVERecord?id=CVE-2026-80047
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-80047.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-80047
Published
2026-09-01T13:40:05.952Z
Modified
2026-09-02T03:47:23.165726283Z
Summary
Hugging Face Transformers library writes remote code to disk prior to consent check
Details

A vulnerability in Hugging Face Transformers (versions >= 4.49.0 and <= 5.8.1) allows remote Python files to be written to local disk without user consent when using GenerativePreTrainedModel.loadcustomgenerate(). The function fetches and caches a remote module file before performing the required trustremotecode 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 customgenerate/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 dynamicmodule_utils.py prior to any trust verification.

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/80xxx/CVE-2026-80047.json",
    "cna_assigner": "certcc"
}
References

Affected packages

Git / github.com/huggingface/transformers

Affected ranges

Type
GIT
Repo
https://github.com/huggingface/transformers
Events
Database specific
Show details
{
    "source": "AFFECTED_FIELD",
    "extracted_events": [
        {
            "introduced": "4.49.0"
        },
        {
            "last_affected": "5.8.1"
        }
    ]
}

Affected versions

4.*
4.55.0-GLM-4.5V-preview
4.55.0-GLM-4.5V-preview-GLM-4.5V-preview
v4.*
v4.49.0-AyaVision
v4.49.0-Mistral-3
v4.50.3-DeepSeek-3
v4.51.3-BitNet-preview
v4.51.3-CSM-preview
v4.51.3-D-FINE-preview
v4.51.3-GraniteMoeHybrid-preview
v4.51.3-InternVL-preview
v4.51.3-Janus-preview
v4.51.3-LlamaGuard-preview
v4.51.3-MLCD-preview
v4.51.3-Qwen2.5-Omni-preview
v4.51.3-SAM-HQ-preview
v4.51.3-TimesFM-preview
v4.52.4-ColQwen2-preview
v4.52.4-Kyutai-STT-preview
v4.52.4-VJEPA-2-preview
v4.53.2-Ernie-4.5-preview
v4.53.2-modernbert-decoder-preview
v4.56.1-Vault-Gemma-preview
v5.*
v5.8.0
v5.8.1

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-80047.json"