{"answers":{"affected":"3 open source packages ship an affected version, including github.com/mudler/LocalAI.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-59707 exists.","fix":"Upgrade github.com/mudler/LocalAI to 1.40.1-0.20260703213242-2cbb3c96b34d or later.","what":"CVE-2026-59707 is a critical server-side request forgery vulnerability in LocalAI, published on 7 Jul 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-59707 and fix it if it is affected.\n\nWhat it is: CVE-2026-59707 is a critical server-side request forgery vulnerability in LocalAI, published on 7 Jul 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-59707 exists.\n\nAffected packages and fixed versions:\n- github.com/mudler/LocalAI (Go): affected all versions; fixed in 1.40.1-0.20260703213242-2cbb3c96b34d\n- github.com/mudler/LocalAI (Go): affected all versions; fixed in 1.40.1-0.20260703213242-2cbb3c96b34d\n- github.com/mudler/LocalAI (Go): affected all versions; fixed in 1.40.1-0.20260703213242-2cbb3c96b34d\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-59707/ (Markdown: https://insights.sbomify.com/CVE-2026-59707/index.md)","id":"CVE-2026-59707","markdown":"https://insights.sbomify.com/CVE-2026-59707/index.md","name":"CVE-2026-59707","record":{"aliases":["GHSA-8c5q-hx4g-qq23","GO-2026-6645"],"analysis":{"component_type":"server_software","fix_type":"patch","impacts":["data_read","security_bypass"],"network_reachable":"yes","non_default_config":false,"product_category":"LocalAI server","requires_auth":"none","summary":"Unauthenticated attackers can force LocalAI to fetch internal URLs via the /models/apply endpoint, leaking partial response data.","user_interaction":"not_required","vuln_class":"ssrf"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"VulnCheck","cpe":[],"cvss":{"score":9.2,"severity":"critical","source":"cna","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N","version":"4.0"},"cwes":[{"id":"CWE-918","name":"Server-Side Request Forgery"}],"description":"LocalAI contains an unauthenticated server-side request forgery vulnerability in the POST /models/apply endpoint that allows attackers to fetch arbitrary internal URLs. The endpoint passes unsanitized gallery URL fields directly to gallery.GetGalleryConfigFromURLWithContext without proper validation, enabling attackers to force the server to issue HTTP GET requests to private and loopback ranges with partial response content leaked through error messages.","ecosystems":["Go"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":1,"refs":[{"date":null,"kind":"nuclei","ref":"http/cves/2026/CVE-2026-59707.yaml","stars":null,"title":"LocalAI \u003c 4.6.0 - Server-Side Request Forgery"}],"tier":"weaponised"},"has_fix":true,"headline":"LocalAI - Server-Side Request Forgery via POST /models/apply","id":"CVE-2026-59707","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Go","product":null,"products":[],"type":"ssrf","year":"2026"},"n_packages":3,"n_references":4,"next":{"headline":"Ghostfolio - Unauthorized Portfolio Data Exposure via Public Endpoint","id":"CVE-2026-59708"},"packages":[{"ecosystem":"Go","fixed":["1.40.1-0.20260703213242-2cbb3c96b34d"],"introduced":["0"],"last_affected":[],"package":"github.com/mudler/LocalAI","purl":null,"source":"GHSA-8c5q-hx4g-qq23"},{"ecosystem":"Go","fixed":["1.40.1-0.20260703213242-2cbb3c96b34d"],"introduced":["0"],"last_affected":[],"package":"github.com/mudler/LocalAI","purl":"pkg:golang/github.com/mudler/LocalAI","source":"GHSA-8c5q-hx4g-qq23"},{"ecosystem":"Go","fixed":["1.40.1-0.20260703213242-2cbb3c96b34d"],"introduced":["0"],"last_affected":[],"package":"github.com/mudler/LocalAI","purl":"pkg:golang/github.com/mudler/LocalAI","source":"GO-2026-6645"}],"prev":{"headline":"mem0 - Unauthenticated Config API Exposure and SSRF via ollama_base_url","id":"CVE-2026-59706"},"products":["LocalAI"],"published":"2026-07-07","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":"Go Vulnerability Database","prefix":"GO"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"attribution","licence":"MIT","name":"Nuclei templates"}],"ssvc":{"automatable":"yes","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2026-09-24","vendors":["LocalAI"]},"summary":"Unauthenticated attackers can force LocalAI to fetch internal URLs via the /models/apply endpoint, leaking partial response data.","url":"https://insights.sbomify.com/CVE-2026-59707/"}