---
title: "CVE-2026-59707: LocalAI POST /models/apply permits unauthenticated server-side request forgery through gallery URLs"
url: https://erroneo.us/security/cve/CVE-2026-59707/
description: "CVE-2026-59707 (github.com/mudler/LocalAI (Go)): LocalAI contains an unauthenticated server-side request forgery vulnerability in the POST /models/apply…"
type: vulnerability-record
section: "Security Digest"
date_published: 2026-07-07
date_modified: 2026-10-02
publisher: erroneo.us
author: erroneo.us Security Desk
cve: "CVE-2026-59707"
kev: false
cvss: 9.2
epss: 0.00482
license: All rights reserved. Quote with attribution and a link.
---

# CVE-2026-59707: LocalAI POST /models/apply permits unauthenticated server-side request forgery through gallery URLs

**Signal:** Critical and remotely reachable. No known exploitation yet, but it is network-reachable without credentials. (Computed from CISA KEV, EPSS and CVSS; not an editorial verdict.)

## Should you act?

- Not in CISA KEV , but CISA’s SSVC assessment records a public proof-of-concept, so attack code exists.
- EPSS 0.5% , percentile 41: FIRST’s model estimates a 0.5% chance of exploitation activity in the next 30 days, higher than 41% of all scored CVEs (low). EPSS is a probability, not a verdict.
- Remotely reachable with no login and no user interaction. If the vulnerable service is exposed to the internet, prioritize it.
- Only applies if your dependency tree includes github.com/mudler/LocalAI (Go) < 1.40.1-0.20260703213242-2cbb3c96b34d, fixed in 1.40.1-0.20260703213242-2cbb3c96b34d . Check your lockfile, including transitive dependencies.

## What it is

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.

## Affected packages

- Go `github.com/mudler/LocalAI` < 1.40.1-0.20260703213242-2cbb3c96b34d → fixed: 1.40.1-0.20260703213242-2cbb3c96b34d

## Affected products (CVE record)

- LocalAI LocalAI: <= v4.3.1

## Severity

- VulnCheck CVSS 4.0: 9.2 `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N`
- VulnCheck CVSS 3.1: 8.6 `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N`
- GitHub CVSS 4.0: 9.2 `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N`

## Exploitation

- CISA KEV: not listed (no confirmed in-the-wild exploitation known to CISA).
- CISA SSVC assessment: exploitation poc , automatable yes , technical impact partial .
- FIRST EPSS (model of 2026-10-21): 0.48% probability of exploitation activity in the next 30 days; percentile 41.

## Sources

- [Patch Commit](https://github.com/mudler/LocalAI/commit/f9b968e19d7cbc556d59dceb2e0e450b828a3fda)
- [GitHub Advisory GHSA-8c5q-hx4g-qq23](https://github.com/advisories/GHSA-8c5q-hx4g-qq23)
- [CVE.org record CVE-2026-59707](https://www.cve.org/CVERecord?id=CVE-2026-59707)
- [NVD entry CVE-2026-59707](https://nvd.nist.gov/vuln/detail/CVE-2026-59707)
- [GitHub Issue](https://github.com/mudler/LocalAI/issues/10665)
- [Product](https://github.com/mudler/LocalAI)
- [vulncheck.com](https://www.vulncheck.com/advisories/localai-server-side-request-forgery-via-post-models-apply)

---
Source page: https://erroneo.us/security/cve/CVE-2026-59707/ · Security Digest: https://erroneo.us/security/ · More: https://erroneo.us/llms.txt
