{"answers":{"affected":"3 open source packages ship an affected version, including transformers.","exploited":"There is no known exploitation of CVE-2026-80047 in the wild and no public exploit code.","fix":"Apply the vendor's patch.","what":"CVE-2026-80047 is a high-severity path traversal vulnerability in Hugging Face Transformers, published on 1 Sep 2026. It can only be exploited from the same machine or local network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2026-80047 and fix it if it is affected.\n\nWhat it is: CVE-2026-80047 is a high-severity path traversal vulnerability in Hugging Face Transformers, published on 1 Sep 2026. It can only be exploited from the same machine or local network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2026-80047 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- transformers (PyPI): affected from 4.49.0 up to 5.8.1; no fix listed\n- transformers (PyPI): affected from 4.49.0 up to 5.8.1; no fix listed\n- transformers (PyPI): affected from 4.49.0 up to 5.8.1; no fix listed\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-80047/ (Markdown: https://insights.sbomify.com/CVE-2026-80047/index.md)","id":"CVE-2026-80047","markdown":"https://insights.sbomify.com/CVE-2026-80047/index.md","name":"CVE-2026-80047","record":{"aliases":["CLSA-2026-1790831175","ECHO-604e-0a83-9b07","GHSA-x9r9-c232-4q39","MINI-433r-h2fr-55qr","MINI-h9gm-47rv-25hg","MINI-rf48-896p-j5f2","PYSEC-2026-4174"],"analysis":{"component_type":"library","fix_type":"patch","impacts":["data_modify","code_execution"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Python ML library","requires_auth":"low_privilege","summary":"Attackers can write malicious Python files to disk before consent checks, potentially leading to persistent unauthorized files and future code execution.","user_interaction":"not_required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"certcc","cpe":[],"cvss":{"score":7.8,"severity":"high","source":"cisa-adp","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-494","name":"Download of Code Without Integrity Check"},{"id":"CWE-367","name":"Time-of-check Time-of-use (TOCTOU) Race Condition"},{"id":"CWE-273","name":"Improper Check for Dropped Privileges"}],"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.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Hugging Face Transformers library writes remote code to disk prior to consent check","id":"CVE-2026-80047","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"path_traversal","year":"2026"},"n_packages":3,"n_references":2,"next":{"headline":"Sssd: sssd-kcm: local denial of service via excessive memory preallocation","id":"CVE-2026-80048"},"packages":[{"ecosystem":"PyPI","fixed":[],"introduced":["4.49.0"],"last_affected":["5.8.1"],"package":"transformers","purl":null,"source":"GHSA-x9r9-c232-4q39"},{"ecosystem":"PyPI","fixed":[],"introduced":["4.49.0"],"last_affected":["5.8.1"],"package":"transformers","purl":"pkg:pypi/transformers","source":"GHSA-x9r9-c232-4q39"},{"ecosystem":"PyPI","fixed":[],"introduced":["4.49.0"],"last_affected":["5.8.1"],"package":"transformers","purl":"pkg:pypi/transformers","source":"PYSEC-2026-4174"}],"prev":{"headline":"User Registration \u0026 Membership \u003c 5.2.6 - Authenticated Privilege Escalation via Login Settings","id":"CVE-2026-79996"},"products":["Transformers"],"published":"2026-09-01","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2026-09-23","vendors":["Hugging Face"]},"summary":"Attackers can write malicious Python files to disk before consent checks, potentially leading to persistent unauthorized files and future code execution.","url":"https://insights.sbomify.com/CVE-2026-80047/"}