CVE-2024-9900 Cross-Site Scripting (XSS) in mudler/localai
Attackers can inject malicious JavaScript via search input in LocalAI, potentially stealing session cookies or hijacking user sessions.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2024-9900?
CVE-2024-9900 is a medium-severity cross-site scripting vulnerability in mudler/localai, published on 20 Mar 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
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.
Weakness: CWE-79
Which versions are affected by CVE-2024-9900?
3 open source packages ship an affected version, including github.com/mudler/LocalAI. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
github.com/mudler/LocalAI Go | All versions | None |
github.com/mudler/LocalAI Go | All versions | 2.22.0 |
github.com/mudler/LocalAI Go | All versions | 2.22.0 |
Products include Mudler Localai.
How do I fix CVE-2024-9900?
Upgrade github.com/mudler/LocalAI to 2.22.0 or later.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is CVE-2024-9900 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-9900 exists.
Other vulnerabilities in mudler/localai
Sources
Also known as GHSA-w6hh-w36c-vxmw, GO-2025-3542.