CVE-2026-59707: 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 Software
Event History
Frequently Asked Questions
What is the severity of CVE-2026-59707?
CVE-2026-59707 has a critical severity rating of 9.2.
How does CVE-2026-59707 affect LocalAI?
CVE-2026-59707 allows attackers to perform server-side request forgery through the POST /models/apply endpoint.
What can attackers do with CVE-2026-59707?
Attackers can use CVE-2026-59707 to fetch arbitrary internal URLs without authentication.
How do I fix CVE-2026-59707?
To fix CVE-2026-59707, ensure proper validation and sanitization of URL fields before processing them.
Is CVE-2026-59707 an authenticated or unauthenticated vulnerability?
CVE-2026-59707 is an unauthenticated vulnerability, meaning it can be exploited without needing valid credentials.