CVE-2026-59707
HighCVSS 8.6Exploitation Probability (EPSS)
Low risk28th percentile - higher than 28% of all known CVEs
Summary
LocalAI has an unauthenticated server-side request forgery vulnerability in the POST /models/apply endpoint, allowing attackers to fetch arbitrary internal URLs. Unsanitized gallery URL fields are passed directly to gallery.GetGalleryConfigFromURLWithContext, enabling HTTP GET requests to private and loopback ranges with partial response leakage via error messages.
Risk Assessment
An attacker can scan internal networks, access sensitive resources (e.g., servers, databases), and potentially escalate attacks to other internal systems, leading to data exposure and infrastructure compromise.
Recommendation
Immediately update LocalAI to the latest patched version and implement URL validation in API endpoints, blocking access to private and loopback IP ranges.
Original NVD description (English source)
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.

