{"answers":{"affected":"It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-58116 exists.","fix":"No fix has been published for CVE-2026-58116 yet. Limit exposure of the affected software until one is available.","what":"CVE-2026-58116 is a critical code injection vulnerability in hiyouga LlamaFactory, published on 30 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2026-58116 and fix it if it is affected.\n\nWhat it is: CVE-2026-58116 is a critical code injection vulnerability in hiyouga LlamaFactory, published on 30 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-58116 exists.\n\nAffected product: hiyouga LlamaFactory. No package-level version data is available, so check the vendor advisory linked from the reference page.\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-58116/ (Markdown: https://insights.sbomify.com/CVE-2026-58116/index.md)","id":"CVE-2026-58116","markdown":"https://insights.sbomify.com/CVE-2026-58116/index.md","name":"CVE-2026-58116","record":{"aliases":["GHSA-mwc7-mf87-v3mf"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"LLaMA-Factory library","requires_auth":"none","summary":"Attackers with WebUI access can execute arbitrary Python code by supplying a malicious model path, leveraging unsafe remote code execution settings.","user_interaction":"not_required","vuln_class":"code_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"VulnCheck","cpe":[{"product":"llama-factory","vendor":"hiyouga"}],"cvss":{"score":9.3,"severity":"critical","source":"cna","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","version":"4.0"},"cwes":[{"id":"CWE-94","name":"Improper Control of Generation of Code"},{"id":"CWE-829","name":"Inclusion of Functionality from Untrusted Control Sphere"}],"description":"LLaMA-Factory through 0.9.5 contains a remote code execution vulnerability that allows attackers with WebUI access to execute arbitrary Python code by supplying a malicious model path in the Chat or Training interfaces. The application passes user-supplied model path input unvalidated into AutoTokenizer.from_pretrained() and AutoModel.from_pretrained() with a hardcoded trust_remote_code=True parameter, causing the Hugging Face transformers library to fetch and execute arbitrary code from a remote or local model repository with the privileges of the server process.","ecosystems":[],"exploits":{"exploitdb":0,"first_seen":"2026-07-02","github_poc":1,"max_poc_stars":0,"metasploit":0,"nuclei":0,"refs":[{"date":"2026-07-02T07:06:16Z","kind":"github_poc","ref":"https://github.com/Hunt-Benito/llama-factory-webui-rce-cve-2026-58116-trust-remote-code-model-path-injection","stars":0,"title":null}],"tier":"weaponised"},"has_fix":false,"headline":"LLaMA-Factory 0.9.5 Remote Code Execution via WebUI Model Path","id":"CVE-2026-58116","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":null,"product":null,"products":[],"type":"code_injection","year":"2026"},"n_packages":0,"n_references":2,"next":{"headline":"This CVE ID has been rejected or withdrawn by its CVE Numbering Authority.","id":"CVE-2026-58118"},"packages":[],"prev":{"headline":"Missing authorization in SIMATIC IoT2050 Advanced","id":"CVE-2026-58115"},"products":["LlamaFactory"],"published":"2026-06-30","related":[{"cvss_score":8.3,"headline":"LLaMA-Factory Remote Code Execution (RCE) Vulnerability","id":"CVE-2025-53002","kev_date_added":null,"published":"2025-06-26"},{"cvss_score":7.6,"headline":"LLaMA Factory's Chat API has Critical SSRF and LFI Vulnerabilities","id":"CVE-2025-61784","kev_date_added":null,"published":"2025-10-07"},{"cvss_score":7.5,"headline":"LLama Factory Remote OS Command Injection Vulnerability","id":"CVE-2024-52803","kev_date_added":null,"published":"2024-11-21"},{"cvss_score":6.1,"headline":"LLaMA-Factory Allows Arbitrary Code Execution via Unsafe Deserialization in Ilamafy_baichuan2.py","id":"CVE-2025-46567","kev_date_added":null,"published":"2025-05-01"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"yes","exploitation":"poc","technical_impact":"total"},"state":"PUBLISHED","updated":"2026-07-14","vendors":["hiyouga"]},"summary":"Attackers with WebUI access can execute arbitrary Python code by supplying a malicious model path, leveraging unsafe remote code execution settings.","url":"https://insights.sbomify.com/CVE-2026-58116/"}