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.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| LocalAI | LocalAI | ≤ v4.3.1 | — |
Automated scanner template
A ready-made Nuclei template detects this vulnerability automatically. Vulnerabilities with public scanner templates are typically probed across the internet soon after the template appears — exposed systems should be patched first.
- LocalAI < 4.6.0 - Server-Side Request Forgery http/cves/2026/CVE-2026-59707.yaml
Source: projectdiscovery/nuclei-templates (MIT) — updated daily. Only links are listed.
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| Go | github.com/mudler/LocalAI | < 1.40.1-0.20260703213242-2cbb3c96b34d | 1.40.1-0.20260703213242-2cbb3c96b34d | GHSA-8c5q-hx4g-qq23 |
References
- GitHub Issue issue-tracking
- Product product
- Patch Commit patch
- https://www.vulncheck.com/advisories/localai-server-side-request-forgery-via-post-models-apply third-party-advisory