CVE-2026-59707: Github.com/mudler/LocalAI LocalAI POST /models/apply Permits Unauthenticated Vulnerability
CRITICALCVE-2026-59707 is a CRITICAL (CVSS 8.6) localai post /models/apply permits unauthenticated vulnerability (CWE-918: Server-Side Request Forgery (SSRF)) affecting Github.com/mudler/LocalAI libraries in the Go ecosystem. The issue involves localai post /models/apply permits unauthenticated server-side request forgery through gallery urls. Remediation is available by upgrading affected packages to version 1.40.1-0.20260703213242-2cbb3c96b34d.
CVE-2026-59707 at a Glance
Security Impact
CVSS: 8.6
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N).
How to Fix CVE-2026-59707
To remediate this vulnerability, upgrade all affected Github.com/mudler/LocalAI dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/mudler/LocalAI to 1.40.1-0.20260703213242-2cbb3c96b34d
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/mudler/LocalAI
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-59707, inspect your project dependencies for Github.com/mudler/LocalAI:
inspect dependencies for github.com/mudler/LocalAI
Analyze the terminal output to locate any version of Github.com/mudler/LocalAI in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.40.1-0.20260703213242-2cbb3c96b34d), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-918: Server-Side Request Forgery (SSRF), where the web server receives a url or similar request from an upstream component and retrieves the contents of this url, but it does not sufficiently ensure that the request is being sent to the expected destination. In Github.com/mudler/LocalAI, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-59707 Affected Github.com/mudler/LocalAI Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/mudler/LocalAI
|
Go |
< 1.40.1-0.20260703213242-2cbb3c96b34d
|
1.40.1-0.20260703213242-2cbb3c96b34d
|
References
Frequently Asked Questions
What is CVE-2026-59707?
Which Github.com/mudler/LocalAI versions are affected?
What version fixes CVE-2026-59707?
Is github.com/mudler/LocalAI affected?
What is the CVSS score of CVE-2026-59707?
What CWE is associated with CVE-2026-59707?
How can I check Go dependencies for CVE-2026-59707?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-8c5q-hx4g-qq23",
"modified" : "2026-10-02T19:14:44Z",
"published" : "2026-07-07T21:31:36Z",
"aliases" : [ "CVE-2026-59707" ],
"summary" : " LocalAI POST /models/apply permits unauthenticated server-side request forgery through gallery URLs",
"details" : "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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N"
}, {
"type" : "CVSS_V4",
"score" : "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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/mudler/LocalAI"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.40.1-0.20260703213242-2cbb3c96b34d"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-59707"
}, {
"type" : "WEB",
"url" : "https://github.com/mudler/LocalAI/issues/10665"
}, {
"type" : "WEB",
"url" : "https://github.com/mudler/LocalAI/commit/f9b968e19d7cbc556d59dceb2e0e450b828a3fda"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/mudler/LocalAI"
}, {
"type" : "WEB",
"url" : "https://www.vulncheck.com/advisories/localai-server-side-request-forgery-via-post-models-apply"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-918" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2026-10-02T19:14:44Z",
"nvd_published_at" : "2026-07-07T21:17:29Z"
}
}