Skip to main content

LocalAI CVE-2026-59707

| EUVDEUVD-2026-42097 CRITICAL
Server-Side Request Forgery (SSRF) (CWE-918)
2026-07-07 VulnCheck GHSA-8c5q-hx4g-qq23
9.2
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Reach exposed LocalAI API
  2. Delivery
    Send POST /models/apply with internal gallery URL
  3. Exploit
    Server fetches loopback/private target
  4. Execution
    Partial response leaked via error message
  5. Impact
    Enumerate internal services and exfiltrate data

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V4 - API and Web Service URL allowlisting, SSRF prevention
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Credential Access

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

The prerequisite is network reachability to LocalAI's HTTP API with the model gallery/apply functionality accessible - specifically the POST /models/apply endpoint accepting a caller-supplied gallery URL field, which is passed to gallery.GetGalleryConfigFromURLWithContext without validation. Per the CVSS vector (AV:N/AC:L/AT:N/PR:N/UI:N) there are no authentication, complexity, or user-interaction barriers, so exploitation works against default configurations wherever the API is exposed. What limits it in practice: LocalAI must be reachable by the attacker (instances bound only to localhost or behind an authenticating proxy/network ACL are not directly exploitable), and the value of the SSRF depends on what internal services the LocalAI host can in turn reach.

Impact

The signals are largely consistent and point to genuine priority: the CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N) describes remote, low-complexity, unauthenticated exploitation with high confidentiality impact to both the vulnerable system (VC:H) and a subsequent system (SC:H), reflecting the internal-network reach an SSRF grants. It is not in CISA KEV and no EPSS score was provided, so exploitation is not confirmed to be active or widespread; the only exploitation-relevant evidence is a VulnCheck advisory and a public GitHub issue, meaning attention exists but weaponization is unproven. Integrity and availability impacts are rated None (VI/VA:N), so this is fundamentally an information-disclosure and network-pivot issue rather than direct RCE - though SSRF against a metadata service or an unauthenticated internal admin API can escalate materially depending on where LocalAI is deployed. Note: EPSS and KEV data are absent from the input, so real-world exploitation frequency cannot be quantified from available signals.

Exploit ScenarioDerived

An attacker who can reach an internet-exposed LocalAI instance sends a single crafted POST /models/apply request whose gallery URL points at http://169.254.169.254/ or an internal admin service. The server fetches the URL on the attacker's behalf and returns partial response content inside its error message, letting the attacker enumerate internal hosts and harvest data such as cloud metadata credentials. No authentication or user interaction is required (PR:N/UI:N/AC:L), so the request can be scripted and repeated against many targets.

Act Now Prioritize within 24-48h. Why: CRITICAL severity + public POC available.
Patch available 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jul 07, 2026

Server-side request forgery in LocalAI's POST /models/apply endpoint lets unauthenticated remote attackers coerce the server into issuing HTTP GET requests to arbitrary internal, private, and loopback addresses, with partial response bodies disclosed back through error messages. The flaw stems from passing attacker-controlled gallery URL fields into gallery.GetGalleryConfigFromURLWithContext without validation, giving attackers a network pivot from the internet into otherwise unreachable back-end services. Reported by VulnCheck with a vendor patch available; no public exploit identified at time of analysis and the CVSS 4.0 base score is 9.2 (Critical).

RemediationAI

Upstream fix available (PR/commit); released patched version not independently confirmed - apply the vendor fix in commit https://github.com/mudler/LocalAI/commit/f9b968e19d7cbc556d59dceb2e0e450b828a3fda by upgrading to a LocalAI build that includes it, then confirm the exact tagged release via the VulnCheck advisory (https://www.vulncheck.com/advisories/localai-server-side-request-forgery-via-post-models-apply) and issue #10665. Until patched, restrict who can reach the /models/apply endpoint by placing LocalAI behind an authenticating reverse proxy or network ACL so it is not internet-exposed (trade-off: breaks any workflow relying on anonymous model installation); egress-filter the LocalAI host so it cannot initiate outbound connections to RFC1918, loopback, link-local (169.254.0.0/16, including cloud metadata 169.254.169.254), and other internal ranges (trade-off: legitimate remote gallery fetches to allowed hosts must be explicitly permitted); and disable or lock down the model gallery/apply feature if it is not needed operationally.

Affected VersionsENISA

LocalAI 0 ≤v4.3.1

Affected Packages

go github.com/mudler/localai fix: 1.40.1-0.20260703213242-2cbb3c96b34d

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in go

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

LocalAI is a self-hosted, OpenAI-compatible inference server (Go, project mudler/LocalAI) that exposes a model 'gallery' feature allowing operators to install models by supplying a remote gallery manifest URL. The /models/apply handler takes the user-supplied gallery URL and hands it directly to the internal gallery.GetGalleryConfigFromURLWithContext fetcher, which performs a server-side HTTP GET. Because the URL is neither validated against an allowlist nor filtered to block private/loopback address ranges, the server can be steered to any destination it can reach - the classic root cause of CWE-918 (Server-Side Request Forgery). The single affected CPE is cpe:2.3:a:localai:localai (all versions prior to the patched build).

Know when Localai gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 9.2 CRITICAL
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
vuln.today AI 8.6 HIGH

Remote, low-complexity, unauthenticated SSRF; scope changes as the server pivots to internal systems (S:C) with high confidentiality via leaked responses, and no integrity or availability impact.

3.1 AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
High
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

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.

Executive ViewAI

Why It Matters

LocalAI's /models/apply endpoint contains an unauthenticated server-side request forgery vulnerability (CVSS 9.2 Critical) allowing remote attackers to access internal backend services and private networks, with partial response disclosure through error messages. Any internet-facing LocalAI deployment is immediately exploitable without credentials, creating a direct pivot point for lateral movement and potential data exfiltration to otherwise unreachable systems.

Business Impact: Severe
Compensating Controls

Apply vendor patch. Interim mitigations while patching: restrict outbound HTTP/HTTPS from LocalAI to only necessary external destinations; disable /models/apply endpoint at WAF or reverse proxy if not actively required; implement strict egress filtering to prevent access to internal address ranges (127.0.0.1/8, 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16).

Threat Intelligence Overview

EPSS Score
0.4%
Top 72% exploitable
Prevalence
Medium
popular open-source self-hosted AI inference server, common but not ubiquitous
Threat Intel
1
1 sources
Exploit
POC
Public exploit code exists
Social Media
2
Sightings
Data Quality
7 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC Yes
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity + public POC available
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Out-of-Cycle
Exploitation
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact
Very High
Technical Impact
Partial

Priority Score

66
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +46
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Server-Side Request Forgery exploits applications that fetch remote resources based on user-supplied URLs.

CVE-2024-6868 CRITICAL POC
9.8 Oct 29

mudler/LocalAI version 2.17.1 allows for arbitrary file write due to improper handling of automatic archive extraction.

CVE-2024-5181 CRITICAL POC
9.8 Jun 26

A command injection vulnerability exists in the mudler/localai version 2.14.0. Rated critical severity (CVSS 9.8), this

CVE-2024-2029 CRITICAL POC
9.8 Apr 10

A command injection vulnerability exists in the `TranscriptEndpoint` of mudler/localai, specifically within the `audioTo

CVE-2024-5182 CRITICAL POC
9.1 Jun 20

A path traversal vulnerability exists in mudler/localai version 2.14.0, where an attacker can exploit the `model` parame

CVE-2024-6983 HIGH POC
8.8 Sep 27

mudler/localai version 2.17.1 is vulnerable to remote code execution. Rated high severity (CVSS 8.8), this vulnerability

CVE-2024-3135 MEDIUM POC
6.5 Apr 01

A Cross-Site Request Forgery (CSRF) vulnerability exists in the mudler/localai application, allowing attackers to craft

CVE-2024-48057 MEDIUM POC
6.1 Nov 04

localai <=2.20.1 is vulnerable to Cross Site Scripting (XSS). Rated medium severity (CVSS 6.1), this vulnerability is re

CVE-2024-7010 MEDIUM POC
5.9 Oct 29

mudler/localai version 2.17.1 is vulnerable to a Timing Attack. Rated medium severity (CVSS 5.9), this vulnerability is

CVE-2024-6095 MEDIUM POC
5.8 Jul 06

A vulnerability in the /models/apply endpoint of mudler/localai versions 2.15.0 allows for Server-Side Request Forgery (

CVE-2026-114493 CRITICAL
9.2 Oct 21

Server-side request forgery in LocalAI 4.6.0 through 4.11.0 allows unauthenticated remote attackers to make the service

CVE-2024-5616 MEDIUM POC
4.3 Jul 06

A Cross-Site Request Forgery (CSRF) vulnerability exists in mudler/LocalAI versions up to and including 2.15.0, which al

CVE-2024-9900 MEDIUM POC
6.1 Mar 20

mudler/localai version v2.21.1 contains a Cross-Site Scripting (XSS) vulnerability in its search functionality. Rated me

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy