{"answers":{"affected":"3 open source packages ship an affected version, including transformers.","exploited":"There is no known exploitation of CVE-2026-9856 in the wild and no public exploit code.","fix":"Upgrade transformers to 5.10.0 or later.","what":"CVE-2026-9856 is a high-severity path traversal vulnerability in huggingface/transformers, published on 2 Aug 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2026-9856 and fix it if it is affected.\n\nWhat it is: CVE-2026-9856 is a high-severity path traversal vulnerability in huggingface/transformers, published on 2 Aug 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2026-9856 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- transformers (PyPI): affected all versions; fixed in 5.10.0\n- transformers (PyPI): affected all versions; fixed in 5.10.0\n- transformers (PyPI): affected all versions; fixed in 5.10.0\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-9856/ (Markdown: https://insights.sbomify.com/CVE-2026-9856/index.md)","id":"CVE-2026-9856","markdown":"https://insights.sbomify.com/CVE-2026-9856/index.md","name":"CVE-2026-9856","record":{"aliases":["CLSA-2026-1788512070","ECHO-230d-a6b3-d275","GHSA-xrqw-3rrv-vx5w","MINI-c5x3-wmfp-xrp6","MINI-h559-7p2f-hm8g","MINI-hr3g-w8w2-xrp2","PYSEC-2026-3929","ROOT-APP-PYPI-CVE-2026-9856"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_modify"],"network_reachable":"yes","non_default_config":false,"product_category":"Python ML library","requires_auth":"none","summary":"Attackers can write arbitrary files via path traversal in save_pretrained methods when processing malicious tokenizer configs.","user_interaction":"required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"@huntr_ai","cpe":[],"cvss":{"score":7.1,"severity":"high","source":"cna","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L","version":"3.0"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"description":"A vulnerability in huggingface/transformers versions \u003c=5.8.0.dev0 allows an attacker to perform arbitrary file writes via path traversal. The issue resides in the `save_pretrained()` methods of `PreTrainedTokenizerBase` and `ProcessorMixin`, where keys from the `chat_template` dictionary are used directly as filenames without proper validation. An attacker can exploit this by publishing a malicious Hugging Face Hub repository with a crafted `tokenizer_config.json` file. When a victim downloads and saves the tokenizer or processor, the attacker-controlled keys can escape the intended save directory, enabling arbitrary file writes with attacker-controlled content. This vulnerability affects multiple processors inheriting from `ProcessorMixin`, including Idefics, Florence, Gemma, Phi, and Qwen-VL.","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":"Path Traversal in huggingface/transformers","id":"CVE-2026-9856","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":"Missing authorization in Invoice123","id":"CVE-2026-9857"},"packages":[{"ecosystem":"PyPI","fixed":["5.10.0"],"introduced":["0"],"last_affected":[],"package":"transformers","purl":null,"source":"GHSA-xrqw-3rrv-vx5w"},{"ecosystem":"PyPI","fixed":["5.10.0"],"introduced":["0"],"last_affected":[],"package":"transformers","purl":"pkg:pypi/transformers","source":"GHSA-xrqw-3rrv-vx5w"},{"ecosystem":"PyPI","fixed":["5.10.0"],"introduced":["0"],"last_affected":[],"package":"transformers","purl":"pkg:pypi/transformers","source":"PYSEC-2026-3929"}],"prev":{"headline":"Custom Field Template \u003c= 2.7.8 - Authenticated (Contributor+) SQL Injection via 'post_ID' Parameter","id":"CVE-2026-9855"},"products":["huggingface/transformers"],"published":"2026-08-02","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":"partial"},"state":"PUBLISHED","updated":"2026-08-03","vendors":["huggingface"]},"summary":"Attackers can write arbitrary files via path traversal in save_pretrained methods when processing malicious tokenizer configs.","url":"https://insights.sbomify.com/CVE-2026-9856/"}