Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessReach LocalAI POST /models/apply endpoint
-
DeliverySubmit gallery config URL on attacker server
-
ExploitServer 302-redirects to cloud metadata/internal address
-
ExecutionLocalAI follows redirect and fetches internally
-
ImpactInternal/IMDS response returned as gallery content
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 | Exploitation requires network reachability to the LocalAI model-management API, specifically the POST /models/apply endpoint, and the attacker must supply a gallery config URL whose server issues an HTTP redirect to an internal, loopback, link-local, or cloud-metadata address (e.g. 169.254.169.254). The flaw triggers only on gallery index/config reads over HTTP(S) in affected versions v4.6.0-v4.11.0, because only the initial config URL was validated while net/http silently followed redirects to unvalidated hops; per the patch, model weight downloads in files[].uri follow a separate redirect policy and are not the vector here. Limiting factors: the API endpoint must be exposed to the attacker (many LocalAI instances bind to localhost or sit on internal networks), the attacker must control or influence a redirecting server, and the high-value outcome assumes the LocalAI host actually has reachable internal services or a cloud metadata endpoint. |
| Impact | This is a genuine high-priority issue, not an inflated CVSS score. The CVSS 4.0 vector (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, base 9.2) describes a remote, low-complexity, unauthenticated SSRF with high confidentiality impact on both the vulnerable system and a subsequent system (SC:H), which is consistent with the CWE-918 classification and the described ability to read internal/cloud-metadata responses. The exploitation signals are mixed by absence: no EPSS score, no CISA KEV listing, and no public exploit code were provided, so exploitation status is 'no public exploit identified at time of analysis' - the finding is credible research from VulnCheck with a confirmed vendor patch (PR #12791) rather than observed in-the-wild activity. One caveat tempers the raw score: although PR:N marks this unauthenticated, real-world risk depends on whether the LocalAI API (POST /models/apply) is network-exposed, since many LocalAI instances are bound to localhost or sit behind internal networks; where the API is reachable, SSRF to cloud metadata endpoints (e.g. 169.254.169.254) is a high-value credential-theft primitive. Net: prioritize patching on any internet- or multi-tenant-exposed LocalAI, treat as lower urgency for strictly localhost deployments. |
| Exploit ScenarioDerived | An attacker who can reach a LocalAI instance's model-apply API submits a gallery configuration URL pointing at an attacker-controlled server that returns an HTTP 302 redirect to an internal address such as the cloud metadata service (169.254.169.254). Because only the initial URL was validated and redirects were resolved inside net/http without re-checking each hop, LocalAI fetches the internal endpoint and returns its contents as gallery data, exposing IMDS credentials or internal services. No public exploit code was identified, but the redirect-bypass technique is straightforward to reproduce from the advisory and patch. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 21, 2026
Server-side request forgery in LocalAI 4.6.0 through 4.11.0 allows unauthenticated remote attackers to make the service fetch internal resources by submitting a gallery config URL to POST /models/apply that redirects to loopback, private, link-local, or cloud metadata addresses and returns the internal response as gallery content. The issue is a redirect-based bypass of the gallery URL guard; exploitation requires the model-management API to be network-reachable and the attacker to control or influence a redirecting server, and high impact depends on reachable internal services or a metadata endpoint. No public exploit identified at time of analysis.
RemediationAI
Apply the upstream fix in PR https://github.com/mudler/LocalAI/pull/12791 or upgrade to a LocalAI release that contains it; the exact released patched version is not independently confirmed from the provided data. Until upgraded, restrict access to POST /models/apply to trusted users or networks, or disable the model-apply/gallery functionality if it is not needed, with the trade-off that legitimate model installation and gallery use will be blocked. Bind the LocalAI API to localhost or place it behind an authenticated reverse proxy to reduce exposure, though this limits remote management. Add egress filtering from the LocalAI host or container to block outbound HTTP(S) to loopback, RFC1918 addresses, link-local ranges including 169.254.0.0/16, and cloud metadata endpoints such as 169.254.169.254, accepting that legitimate private model registries or local content servers may also be blocked. See the vendor advisory at https://www.vulncheck.com/advisories/localai-4.6.0-through-4.11.0-ssrf-guard-bypass-via-http-redirects.
Affected VersionsENISA
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
CWE-918 server-side request forgery affects LocalAI's Go-based model gallery flow: core/gallery/gallery.go validated only the initial gallery config URL, but Go's net/http client follows HTTP redirects internally, so a public URL returning a 302 to 127.0.0.1, an RFC1918 address, a link-local address, or a cloud metadata endpoint bypassed that check. The patch in PR 12791 adds redirectValidatedHTTPClient in pkg/downloader/uri.go, wired through WithRedirectURLValidation in pkg/httpclient/client.go, which re-runs utils.ValidateExternalURL on every redirect hop before the redirect is followed and aborts the chain on rejection. Per the patch, model weight downloads in files[].uri retain their existing redirect policy and are not the vector described here. The CPE cpe:2.3:a:localai:localai:*:*:*:*:*:*:*:* is a wildcard, but the advisory scopes the issue to LocalAI v4.6.0 through v4.11.0.
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
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
Remote unauthenticated SSRF via POST /models/apply (AV:N/AC:L/PR:N/UI:N); internal responses cross a trust boundary so S:C with C:H, no integrity or availability impact.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
LocalAI v4.6.0 through v4.11.0 contains a server-side request forgery vulnerability in core/gallery/gallery.go that validates only the initial gallery config URL. Attackers can submit a config URL through POST /models/apply that redirects to internal or cloud metadata addresses, receiving those internal responses as gallery content.
Executive ViewAI
LocalAI installations running versions 4.6.0 through 4.11.0 are exposed to a critical server-side request forgery flaw that can turn the AI model-serving platform into a bridge into private networks and cloud control planes. Any team operating LocalAI with its model-management API reachable from shared or external networks - especially in cloud environments that expose instance metadata services - should treat this as a credential-and-lateral-movement exposure rather than an application defect. No public exploit has been identified at time of analysis and a vendor patch is available, so the organization can close the gap before attack activity is observed.
Apply vendor patch.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Server-Side Request Forgery exploits applications that fetch remote resources based on user-supplied URLs.
mudler/LocalAI version 2.17.1 allows for arbitrary file write due to improper handling of automatic archive extraction.
A command injection vulnerability exists in the mudler/localai version 2.14.0. Rated critical severity (CVSS 9.8), this
A command injection vulnerability exists in the `TranscriptEndpoint` of mudler/localai, specifically within the `audioTo
Server-side request forgery in LocalAI's POST /models/apply endpoint lets unauthenticated remote attackers coerce the se
A path traversal vulnerability exists in mudler/localai version 2.14.0, where an attacker can exploit the `model` parame
mudler/localai version 2.17.1 is vulnerable to remote code execution. Rated high severity (CVSS 8.8), this vulnerability
A Cross-Site Request Forgery (CSRF) vulnerability exists in the mudler/localai application, allowing attackers to craft
localai <=2.20.1 is vulnerable to Cross Site Scripting (XSS). Rated medium severity (CVSS 6.1), this vulnerability is re
mudler/localai version 2.17.1 is vulnerable to a Timing Attack. Rated medium severity (CVSS 5.9), this vulnerability is
A vulnerability in the /models/apply endpoint of mudler/localai versions 2.15.0 allows for Server-Side Request Forgery (
A Cross-Site Request Forgery (CSRF) vulnerability exists in mudler/LocalAI versions up to and including 2.15.0, which al
mudler/localai version v2.21.1 contains a Cross-Site Scripting (XSS) vulnerability in its search functionality. Rated me
EUVD-2026-107421
GHSA-vhg8-m8fr-3863
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB