CVE-2024-9900: Github.com/mudler/LocalAI Cross-Site Scripting Vulnerability
MODERATECVE-2024-9900 is a MODERATE (CVSS 5.4) cross-site scripting vulnerability (CWE-115: Misinterpretation of Input) affecting Github.com/mudler/LocalAI libraries in the Go ecosystem. The issue involves localai cross-site scripting (xss) vulnerability in its search functionality. Remediation is available by upgrading affected packages to version 2.22.0.
CVE-2024-9900 at a Glance
Security Impact
CVSS: 5.4
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:R/S:U/C:L/I:L/A:N).
How to Fix CVE-2024-9900
To remediate this vulnerability, upgrade all affected Github.com/mudler/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/mudler/LocalAI to 2.22.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/mudler/LocalAI
How to Check if You Are Affected
To determine whether your application is affected by CVE-2024-9900, inspect your project dependencies for Github.com/mudler/LocalAI:
inspect dependencies for github.com/mudler/LocalAI
Analyze the terminal output to locate any version of Github.com/mudler/LocalAI in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.22.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-115: Misinterpretation of Input, where the product misinterprets an input, whether from an attacker or another product, in a security-relevant fashion. In Github.com/mudler/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-9900 Affected Github.com/mudler/LocalAI Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/mudler/LocalAI
|
Go |
< 2.22.0
|
2.22.0
|
References
Frequently Asked Questions
What is CVE-2024-9900?
Which Github.com/mudler/LocalAI versions are affected?
What version fixes CVE-2024-9900?
Is github.com/mudler/LocalAI affected?
What is the CVSS score of CVE-2024-9900?
What CWE is associated with CVE-2024-9900?
How can I check Go dependencies for CVE-2024-9900?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-w6hh-w36c-vxmw",
"modified" : "2025-03-21T03:39:11Z",
"published" : "2025-03-20T12:32:51Z",
"aliases" : [ "CVE-2024-9900" ],
"summary" : "LocalAI Cross-Site Scripting (XSS) vulnerability in its search functionality",
"details" : "mudler/localai version v2.21.1 contains a Cross-Site Scripting (XSS) vulnerability in its search functionality. The vulnerability arises due to improper sanitization of user input, allowing the injection and execution of arbitrary JavaScript code. This can lead to the execution of malicious scripts in the context of the victim's browser, potentially compromising user sessions, stealing session cookies, redirecting users to malicious websites, or manipulating the DOM.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/mudler/LocalAI"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.22.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-9900"
}, {
"type" : "WEB",
"url" : "https://github.com/mudler/localai/commit/a1634b219a4e52813e70ff07e6376a01449c4515"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/mudler/LocalAI"
}, {
"type" : "WEB",
"url" : "https://huntr.com/bounties/b39cd230-db66-471b-89b9-24afaa078e68"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-115", "CWE-79" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2025-03-21T03:39:10Z",
"nvd_published_at" : "2025-03-20T10:15:50Z"
}
}