CVE-2024-2029: Github.com/go skynet/LocalAI LocalAI Command Injection Vulnerability
CRITICALCVE-2024-2029 is a CRITICAL (CVSS 9.8) localai command injection vulnerability (CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')) affecting Github.com/go skynet/LocalAI libraries in the Go ecosystem. The issue involves localai command injection in audiotowav. Remediation is available by upgrading affected packages to version 2.10.0.
CVE-2024-2029 at a Glance
Security Impact
CVSS: 9.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2024-2029
To remediate this vulnerability, upgrade all affected Github.com/go skynet/LocalAI dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/go-skynet/LocalAI to 2.10.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/go-skynet/LocalAI
How to Check if You Are Affected
To determine whether your application is affected by CVE-2024-2029, inspect your project dependencies for Github.com/go skynet/LocalAI:
inspect dependencies for github.com/go-skynet/LocalAI
Analyze the terminal output to locate any version of Github.com/go skynet/LocalAI in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.10.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), where the product constructs all or part of an os command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended os command when it is sent to a downstream component. In Github.com/go skynet/LocalAI, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2024-2029 Affected Github.com/go skynet/LocalAI Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/go-skynet/LocalAI
|
Go |
< 2.10.0
|
2.10.0
|
References
Frequently Asked Questions
What is CVE-2024-2029?
Which Github.com/go skynet/LocalAI versions are affected?
What version fixes CVE-2024-2029?
Is github.com/go-skynet/LocalAI affected?
What is the CVSS score of CVE-2024-2029?
What CWE is associated with CVE-2024-2029?
How can I check Go dependencies for CVE-2024-2029?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-wx43-g55g-2jf4",
"modified" : "2024-07-08T21:04:48Z",
"published" : "2024-04-10T18:30:48Z",
"aliases" : [ "CVE-2024-2029" ],
"summary" : "LocalAI Command Injection in audioToWav",
"details" : "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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/go-skynet/LocalAI"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.10.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-2029"
}, {
"type" : "WEB",
"url" : "https://github.com/mudler/localai/commit/31a4c9c9d3abc58de2bdc5305419181c8b33eb1c"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/mudler/LocalAI"
}, {
"type" : "WEB",
"url" : "https://huntr.com/bounties/e092528a-ce3b-4e66-9b98-3f56d6b276b0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-78" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2024-04-10T22:16:45Z",
"nvd_published_at" : "2024-04-10T17:15:53Z"
}
}