{"answers":{"affected":"3 open source packages ship an affected version, including llamafactory. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-61784 exists.","fix":"Upgrade llamafactory to 0.9.4 or later.","what":"CVE-2025-61784 is a high-severity server-side request forgery vulnerability in hiyouga LLaMA-Factory, published on 7 Oct 2025. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2025-61784 and fix it if it is affected.\n\nWhat it is: CVE-2025-61784 is a high-severity server-side request forgery vulnerability in hiyouga LLaMA-Factory, published on 7 Oct 2025. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-61784 exists.\n\nAffected packages and fixed versions:\n- llamafactory (PyPI): affected all versions; fixed in 0.9.4\n- llamafactory (PyPI): affected all versions; fixed in 0.9.4\n- llamafactory (PyPI): affected all versions; fixed in 0.9.4\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-2025-61784/ (Markdown: https://insights.sbomify.com/CVE-2025-61784/index.md)","id":"CVE-2025-61784","markdown":"https://insights.sbomify.com/CVE-2025-61784/index.md","name":"CVE-2025-61784","record":{"aliases":["GHSA-527m-2xhr-j27g","PYSEC-2026-1573"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_read","security_bypass"],"network_reachable":"yes","non_default_config":false,"product_category":"LLM tuning library","requires_auth":"low_privilege","summary":"Authenticated users can exploit SSRF and LFI in the Chat API to access internal networks and read arbitrary server files.","user_interaction":"not_required","vuln_class":"ssrf"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"llama-factory","vendor":"hiyouga"}],"cvss":{"score":7.6,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:L","version":"3.1"},"cwes":[{"id":"CWE-918","name":"Server-Side Request Forgery"},{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"description":"LLaMA-Factory is a tuning library for large language models. Prior to version 0.9.4, a Server-Side Request Forgery (SSRF) vulnerability in the chat API allows any authenticated user to force the server to make arbitrary HTTP requests to internal and external networks. This can lead to the exposure of sensitive internal services, reconnaissance of the internal network, or interaction with third-party services. The same mechanism also allows for a Local File Inclusion (LFI) vulnerability, enabling users to read arbitrary files from the server's filesystem. The vulnerability exists in the `_process_request` function within `src/llamafactory/api/chat.py.` This function is responsible for processing incoming multimodal content, including images, videos, and audio provided via URLs. The function checks if the provided URL is a base64 data URI or a local file path (`os.path.isfile`). If neither is true, it falls back to treating the URL as a web URI and makes a direct HTTP GET request using `requests.get(url, stream=True).raw` without any validation or sanitization of the URL. Version 0.9.4 fixes the underlying issue.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"LLaMA Factory's Chat API has Critical SSRF and LFI Vulnerabilities","id":"CVE-2025-61784","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"ssrf","year":"2025"},"n_packages":3,"n_references":2,"next":{"headline":"Deno's --deny-write check does not prevent permission bypass","id":"CVE-2025-61785"},"packages":[{"ecosystem":"PyPI","fixed":["0.9.4"],"introduced":["0"],"last_affected":[],"package":"llamafactory","purl":null,"source":"GHSA-527m-2xhr-j27g"},{"ecosystem":"PyPI","fixed":["0.9.4"],"introduced":["0"],"last_affected":[],"package":"llamafactory","purl":"pkg:pypi/llamafactory","source":"GHSA-527m-2xhr-j27g"},{"ecosystem":"PyPI","fixed":["0.9.4"],"introduced":["0"],"last_affected":[],"package":"llamafactory","purl":"pkg:pypi/llamafactory","source":"PYSEC-2026-1573"}],"prev":{"headline":"Python Social Auth - Django has unsafe account association","id":"CVE-2025-61783"},"products":["LLaMA-Factory"],"published":"2025-10-07","related":[{"cvss_score":9.3,"headline":"LLaMA-Factory 0.9.5 Remote Code Execution via WebUI Model Path","id":"CVE-2026-58116","kev_date_added":null,"published":"2026-06-30"},{"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.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":"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":"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)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-10-07","vendors":["hiyouga"]},"summary":"Authenticated users can exploit SSRF and LFI in the Chat API to access internal networks and read arbitrary server files.","url":"https://insights.sbomify.com/CVE-2025-61784/"}