LocalAI POST /models/apply permits unauthenticated server-side request forgery through gallery URLs
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.
- Products
- github.com/mudler/LocalAI
- Affected versions
- Not specified
- Fixed versions
- 1.40.1-0.20260703213242-2cbb3c96b34d
- CVEs
- CVE-2026-59707
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 28 Oct 2026, 08:46 UTC · Revision 1
Source evidence
LocalAI POST /models/apply permits unauthenticated server-side request forgery through gallery URLs
core-osv · Original sourcePublished 7 Jul 2026, 21:31 UTC
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.
osv:GHSA-8c5q-hx4g-qq23
github.com/mudler/LocalAI
Fixed versions: 1.40.1-0.20260703213242-2cbb3c96b34d
Complete source record
{
"id": "8418ec8e41628396833a35936a7d34f1455f4431e3cf64b3eaa6bd18e1df993a",
"url": "https://osv.dev/vulnerability/GHSA-8c5q-hx4g-qq23",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "LocalAI POST /models/apply permits unauthenticated server-side request forgery through gallery URLs",
"summary": "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.",
"evidence": "osv:GHSA-8c5q-hx4g-qq23",
"products": [
{
"name": {
"value": "github.com/mudler/LocalAI",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "1.40.1-0.20260703213242-2cbb3c96b34d",
"evidence": "/affected/0/ranges"
}
],
"affected_versions": []
}
],
"severity": "critical",
"structured": {
"id": "GHSA-8c5q-hx4g-qq23",
"aliases": [
"CVE-2026-59707",
"GHSA-8c5q-hx4g-qq23",
"GO-2026-6645"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N"
},
{
"type": "CVSS_V4",
"score": "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"
}
],
"affected": [
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "0"
},
{
"fixed": "1.40.1-0.20260703213242-2cbb3c96b34d"
}
]
}
],
"package": {
"name": "github.com/mudler/LocalAI",
"purl": "pkg:golang/github.com/mudler/LocalAI",
"ecosystem": "Go"
},
"database_specific": {
"source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/07/GHSA-8c5q-hx4g-qq23/GHSA-8c5q-hx4g-qq23.json"
}
}
],
"modified": "2026-10-07T17:55:52.810868417Z",
"provider": "osv",
"references": [
"https://nvd.nist.gov/vuln/detail/CVE-2026-59707",
"https://github.com/mudler/LocalAI/issues/10665",
"https://github.com/mudler/LocalAI/commit/f9b968e19d7cbc556d59dceb2e0e450b828a3fda",
"https://github.com/mudler/LocalAI",
"https://www.vulncheck.com/advisories/localai-server-side-request-forgery-via-post-models-apply"
],
"provider_metadata": {
"cwe_ids": [
"CWE-918"
],
"severity": "CRITICAL",
"github_reviewed": true,
"nvd_published_at": "2026-07-07T21:17:29Z",
"github_reviewed_at": "2026-10-02T19:14:44Z"
}
},
"related_cves": [
{
"value": "CVE-2026-59707",
"evidence": "/aliases"
}
],
"security_relevant": true,
"severity_evidence": "/database_specific/severity"
},
"source_id": "core-osv",
"document_id": 97133,
"published_at": "2026-07-07T21:31:36+00:00"
}LocalAI POST /models/apply permits unauthenticated server-side request forgery through gallery URLs in github.com/mudler/LocalAI
core-osv · Original sourcePublished 7 Oct 2026, 14:10 UTC
LocalAI POST /models/apply permits unauthenticated server-side request forgery through gallery URLs in github.com/mudler/LocalAI
osv:GO-2026-6645
github.com/mudler/LocalAI
Fixed versions: 1.40.1-0.20260703213242-2cbb3c96b34d
Complete source record
{
"id": "1502f3fe9b516f4986894d38cee3a9f665dd8c76f1d4afc15eee2a22c0f96830",
"url": "https://osv.dev/vulnerability/GO-2026-6645",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "LocalAI POST /models/apply permits unauthenticated server-side request forgery through gallery URLs in github.com/mudler/LocalAI",
"summary": "LocalAI POST /models/apply permits unauthenticated server-side request forgery through gallery URLs in github.com/mudler/LocalAI",
"evidence": "osv:GO-2026-6645",
"products": [
{
"name": {
"value": "github.com/mudler/LocalAI",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "1.40.1-0.20260703213242-2cbb3c96b34d",
"evidence": "/affected/0/ranges"
}
],
"affected_versions": []
}
],
"severity": "unknown",
"structured": {
"id": "GO-2026-6645",
"aliases": [
"CVE-2026-59707",
"GHSA-8c5q-hx4g-qq23",
"GO-2026-6645"
],
"affected": [
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "0"
},
{
"fixed": "1.40.1-0.20260703213242-2cbb3c96b34d"
}
]
}
],
"package": {
"name": "github.com/mudler/LocalAI",
"purl": "pkg:golang/github.com/mudler/LocalAI",
"ecosystem": "Go"
},
"database_specific": {
"source": "https://vuln.go.dev/ID/GO-2026-6645.json"
},
"ecosystem_specific": {}
}
],
"modified": "2026-10-07T17:45:13.482040153Z",
"provider": "osv",
"references": [
"https://github.com/advisories/GHSA-8c5q-hx4g-qq23",
"https://nvd.nist.gov/vuln/detail/CVE-2026-59707",
"https://github.com/mudler/LocalAI/commit/f9b968e19d7cbc556d59dceb2e0e450b828a3fda",
"https://github.com/mudler/LocalAI/issues/10665",
"https://www.vulncheck.com/advisories/localai-server-side-request-forgery-via-post-models-apply"
],
"provider_metadata": {
"url": "https://pkg.go.dev/vuln/GO-2026-6645",
"review_status": "UNREVIEWED"
}
},
"related_cves": [
{
"value": "CVE-2026-59707",
"evidence": "/aliases"
}
],
"security_relevant": true,
"severity_evidence": null
},
"source_id": "core-osv",
"document_id": 97107,
"published_at": "2026-10-07T14:10:14+00:00"
}