Vulnerabilities in pkg:golang/github.com/mudler/LocalAI

PACKAGE
Advisory Identifier: GHSA-8c5q-hx4g-qq23
Advisory Summary

CVE-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.

3 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:golang/github.com/mudler/LocalAI

3 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:golang/github.com/mudler/LocalAI. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-8c5q-hx4g-qq23 CVE-2026-59707 CRITICAL LocalAI POST /models/apply permits unauthenticated server-side request forgery through gallery URLs
GHSA-w6hh-w36c-vxmw CVE-2024-9900 MODERATE LocalAI Cross-Site Scripting (XSS) vulnerability in its search functionality
GHSA-ghx4-cgxw-7h9p CVE-2024-48057 LOW LocalAI Cross-site Scripting vulnerability

CVE-2026-59707 at a Glance

CVE Identifier CVE-2026-59707
GHSA Identifier GHSA-8c5q-hx4g-qq23
Severity CRITICAL
CVSS v3.1 Base Score 8.6
CWE Classification CWE-918: Server-Side Request Forgery (SSRF)
Affected Product Github.com/mudler/LocalAI
Package Ecosystem Go
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (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.

github.com/mudler/LocalAI fixed: 1.40.1-0.20260703213242-2cbb3c96b34d
Upgrade github.com/mudler/LocalAI to 1.40.1-0.20260703213242-2cbb3c96b34d
Verify Direct and Transitive Dependencies

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

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.

CVE-2026-59707 Affected Github.com/mudler/LocalAI Versions

1 component(s)
Fixed Versions:
1.40.1-0.20260703213242-2cbb3c96b34d
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?
CVE-2026-59707 is a security vulnerability in Github.com/mudler/LocalAI involving LocalAI POST /models/apply permits unauthenticated server-side request forgery through gallery URLs under CWE-918: Server-Side Request Forgery (SSRF).
Which Github.com/mudler/LocalAI versions are affected?
Affected versions include releases prior to 1.40.1-0.20260703213242-2cbb3c96b34d across affected packages: github.com/mudler/LocalAI.
What version fixes CVE-2026-59707?
Upgrading to 1.40.1-0.20260703213242-2cbb3c96b34d (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/mudler/LocalAI affected?
Yes, github.com/mudler/LocalAI is affected in releases prior to 1.40.1-0.20260703213242-2cbb3c96b34d. Upgrade your dependency to 1.40.1-0.20260703213242-2cbb3c96b34d or later.
What is the CVSS score of CVE-2026-59707?
CVE-2026-59707 has a CVSS v3.1 base score of 8.6 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N.
What CWE is associated with CVE-2026-59707?
CVE-2026-59707 is classified under CWE-918: Server-Side Request Forgery (SSRF) (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.).
How can I check Go dependencies for CVE-2026-59707?
Run the dependency tree command: 'inspect dependencies for github.com/mudler/LocalAI'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}