CVE-2024-2029 Command Injection in mudler/localai
Attackers can execute arbitrary commands on the host via unsanitized filenames in the audio transcription endpoint of LocalAI.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2024-2029?
CVE-2024-2029 is a critical command injection vulnerability in mudler/localai, published on 10 Apr 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official 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.
Weakness: CWE-78
Which versions are affected by CVE-2024-2029?
3 open source packages ship an affected version, including github.com/go-skynet/LocalAI. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
github.com/go-skynet/LocalAI Go | All versions | None |
github.com/go-skynet/LocalAI Go | All versions | 2.10.0 |
github.com/go-skynet/LocalAI Go | All versions | 2.10.0 |
Products include Mudler Localai.
How do I fix CVE-2024-2029?
Upgrade github.com/go-skynet/LocalAI to 2.10.0 or later.
Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.
Is CVE-2024-2029 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-2029 exists.
Other vulnerabilities in mudler/localai
Sources
Also known as GHSA-wx43-g55g-2jf4, GO-2024-2717.