LocalAI - SSRF (CVE-2026-59707)
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.
psychologyCrowdSec Analysis
CVE-2026-59707 is a critical unauthenticated server-side request forgery (SSRF) vulnerability in LocalAI’s POST /models/apply endpoint. Attackers can make the server send requests to arbitrary internal, private, or loopback URLs, potentially exposing partial response data through error messages and enabling reconnaissance of otherwise inaccessible systems.
CrowdSec has been tracking this vulnerability and its exploits since 26th of October 2026.
CrowdSec network observations suggest that most exploitation of CVE-2026-59707 involves focused reconnaissance to identify viable targets. Attackers typically tailor their campaigns based on system exposure and configuration. It is unlikely that a given attack is accidental. Data from the CrowdSec community also indicates a gradual decrease in attacks targeting CVE-2026-59707. While still present in the wild, exploitation levels have dropped noticeably week-over-week. This may signal that the vulnerability is becoming less relevant or that defenses are improving fast enough for attackers to lose interest.
Attackers target the POST /models/apply endpoint and supply a crafted URL in the JSON url field, causing the server to make requests to attacker-controlled or internal network resources. The fetched result may be reflected in the model-apply job status.
Full Intelligence Available
Connect your API key to access CrowdSec scores, exploit timelines, and attacker IPs.
| Event | Date |
|---|---|
| CVE Published | 2026-07-07 |
| Rule Released | 2026-10-26 |
| CrowdSec First Seen | 2026-10-28 |
Remediation & Protection
External References
- https://github.com/mudler/LocalAI/issues/10665
- https://github.com/mudler/LocalAI
- https://github.com/mudler/LocalAI/commit/f9b968e19d7cbc556d59dceb2e0e450b828a3fda
- https://www.vulncheck.com/advisories/localai-server-side-request-forgery-via-post-models-apply
- https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2026/CVE-2026-59707.yaml