CRITICAL🇵🇱 Wersja polska

CVE-2024-2029

CVSS 9.8v3.0pub. 2024-04-10upd. 2025-07-15

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.

🤖 AI Analysis
How it works

The `audioToWav` function responsible for converting audio files to WAV format passes the filename provided by the user directly to the shell command invoking ffmpeg, without any validation or sanitization. An attacker can craft a malicious filename containing additional system commands (e.g., using shell special characters), which will be executed in the context of the server process. No authentication or user interaction is required.

Impact

Successful exploitation of the vulnerability allows an attacker to execute arbitrary commands on the server hosting LocalAI, which may lead to unauthorized data access, disclosure of sensitive information, system takeover, or other damage depending on process privileges.

Mitigation & patch

mudler/LocalAI should be updated to a version containing commit 31a4c9c9d3abc58de2bdc5305419181c8b33eb1c, which introduces proper sanitization of filenames passed to ffmpeg. Details are available in the vendor references on GitHub and in the report on the huntr.com platform.

Who is affected

Product mudler/LocalAI — versions indicated in vendor references (patched commit: 31a4c9c9d3abc58de2bdc5305419181c8b33eb1c)

Analysis generated by Claude AI (Anthropic) based on NVD data. Always verify with vendor.
CVSS Vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Mudler Localai

    APP
    Mudler
    < 2.10.0
🔵
CHECK WITH VENDOR
No clear patch data available. Check vendor references.
Tags
Command Injection
CWE
References

Related vulnerabilities

CVE-2024-6868CRITICAL9.8PL ✓ten sam produkt

Podatność tarslip w LocalAI umożliwiająca RCE przez arbitralny zapis pliku

CVE-2024-5181CRITICAL9.8PL ✓ten sam produkt

Command injection w LocalAI — pełne przejęcie systemu przez parametr backend

CVE-2024-5182CRITICAL9.1PL ✓ten sam produkt

Path traversal w LocalAI umożliwiający usuwanie dowolnych plików

CVE-2024-6983HIGH8.8ten sam produkt

mudler/localai version 2.17.1 is vulnerable to remote code execution. The vulnerability arises because the loc...

CVE-2024-9900MEDIUM6.1ten sam produkt

mudler/localai version v2.21.1 contains a Cross-Site Scripting (XSS) vulnerability in its search functionality...