CVE-2026-59707 — LocalAI
Fix: mudler/LocalAI@f9b968eCVE-2026-59707 is a Server-Side Request Forgery (SSRF) vulnerability in github.com/mudler/LocalAI. A fix is available for github.com/mudler/LocalAI — see the affected versions and patch details below.
LocalAI - Server-Side Request Forgery via POST /models/apply
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
- CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
Exploitation and automatability from CISA’s SSVC triage for CVE-2026-59707.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
Real-World Exposure
github.com/mudler/LocalAIReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.
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 Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | github.com/mudler/LocalAI | all versions | 1.40.1-0.20260703213242-2cbb3c96b34dgo get github.com/mudler/LocalAI@v1.40.1-0.20260703213242-2cbb3c96b34d |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/mudler/LocalAI, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update github.com/mudler/LocalAI to 1.40.1-0.20260703213242-2cbb3c96b34d or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-59707 is resolved across your whole dependency graph.
Workarounds
Restrict outbound requests from the affected component to an allowlist of hosts, block access to link-local and internal address ranges at the network layer, and require authentication on internal services so a forged request cannot reach them unauthenticated.
Frequently Asked Questions
Is CVE-2026-59707 in your dependencies?
Find it across Go, including transitive dependencies.