LocalAI
LocalAI - Server-Side Request Forgery via POST /models/apply
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.
Affected versions and mitigation
From the CVE record, GitHub Security Advisories and the vendor's references.Affected
- <= v4.3.1
- < 1.40.1-0.20260703213242-2cbb3c96b34d
Fixed in 1.40.1-0.20260703213242-2cbb3c96b34d
from GitHub Security Advisory GHSA-8c5q-hx4g-qq23
Mitigation
Upgrade github.com/mudler/LocalAI to 1.40.1-0.20260703213242-2cbb3c96b34d or later.
References
Timeline
Days relative to CVE publicationFirst public PoC 105 days after publication; not in CISA KEV. First PoC: nuclei template: LocalAI < 4.6.0 - Server-Side Request Forgery (nuclei template, 20 Oct 2026).
PoC repositories
Found on GitHub.No PoC repositories found yet.
Other public exploits
Exploit-DB, Metasploit and nuclei count as public PoCs. Exploit-tagged references from the CVE record and NVD are links only. None of these are analysed by us.| Source | Title | Published | Found by us |
|---|---|---|---|
| nuclei template | nuclei template: LocalAI < 4.6.0 - Server-Side Request Forgery | 20 Oct 2026 | 14 Nov 2026 |