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.
Security readout for executives and security teams
Plain-English summary
LocalAI servers may let unauthenticated attackers make the server request internal addresses. That can expose cloud metadata, admin panels, or private services through partial error-message leakage. Treat externally reachable LocalAI deployments as urgent, especially in cloud or flat internal networks.
Executive priority
Prioritize remediation for any internet-facing or broadly accessible LocalAI service. The business risk is internal data exposure from systems that were never meant to be reachable externally.
Technical view
CVE-2026-59707 is a CWE-918 SSRF in POST /models/apply. Unsanitized gallery URL fields are passed to gallery.GetGalleryConfigFromURLWithContext, allowing server-side HTTP GET requests to private and loopback ranges with partial response disclosure in errors. CVSS v4.0 is 9.2.
Likely exposure
Exposure is likely limited to LocalAI deployments where /models/apply is reachable by untrusted users. The provided sources identify LocalAI as affected but do not clearly define vulnerable release ranges beyond the CVE record’s version data.
Exploitation context
No KEV listing is provided, and the source bundle does not claim active exploitation. The issue is still high-risk because it is unauthenticated, network-reachable, low-complexity, and can reach internal services from the server’s trust position.
Researcher notes
The record indicates arbitrary internal URL fetching and partial response leakage through errors, but the provided bundle does not include precise affected version ranges or exploitation-in-the-wild evidence. Avoid assuming broader product impact without vendor confirmation.
Mitigation direction
Apply the upstream patch commit or a vendor release containing it.
Check LocalAI guidance for exact fixed versions and upgrade instructions.
Restrict /models/apply from untrusted networks until fixed.
Block LocalAI egress to metadata, loopback, and private ranges where feasible.
Review logs for unexpected model-apply requests and internal URL fetch attempts.
Validation and detection
Inventory LocalAI deployments and determine whether /models/apply is externally reachable.
Confirm the deployed code includes patch commit f9b968e19d7cbc556d59dceb2e0e450b828a3fda.
Review reverse proxy, firewall, and service mesh controls protecting LocalAI.
Check application logs for errors referencing private, loopback, or metadata URLs.
Validate egress policies prevent server-side access to sensitive internal endpoints.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · medium confidence lookup
CWE-918: Information exposure and cloud metadata lookup
Information exposure and SSRF weaknesses can make discovery, cloud metadata, and credential material review relevant. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
The CVE wording references SSRF or metadata access, so cloud discovery and credential material review may help. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-918 · source CWE mapping
Server-Side Request Forgery (SSRF)
Server-Side Request Forgery (SSRF) represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.