LocalAI POST /models/apply permits unauthenticated server-side request forgery through gallery URLsGHSA-8c5q-hx4g-qq23
HIGHFix: mudler/LocalAI@f9b968eGHSA-8c5q-hx4g-qq23 is a high-severity (CVSS 8.6) Server-Side Request Forgery (SSRF) vulnerability in github.com/mudler/LocalAI. A fix is available for github.com/mudler/LocalAI — see the affected versions and patch details below.
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
- CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
Exploitation and automatability from CISA’s SSVC triage for GHSA-8c5q-hx4g-qq23.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
GHSA-8c5q-hx4g-qq23 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.
Where this sits among everything scored
Of 394,803 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
github.com/mudler/LocalAIReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.
Description
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
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | github.com/mudler/LocalAI | all versions | 1.40.1-0.20260703213242-2cbb3c96b34dgo get github.com/mudler/LocalAI@v1.40.1-0.20260703213242-2cbb3c96b34d |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/mudler/LocalAI, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update github.com/mudler/LocalAI to 1.40.1-0.20260703213242-2cbb3c96b34d or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-8c5q-hx4g-qq23 is resolved across your whole dependency graph.
Workarounds
Restrict outbound requests from the affected component to an allowlist of hosts, block access to link-local and internal address ranges at the network layer, and require authentication on internal services so a forged request cannot reach them unauthenticated.
Frequently Asked Questions
Is GHSA-8c5q-hx4g-qq23 in your dependencies?
Find it across Go, including transitive dependencies.