LocalAI Cross-Site Scripting (XSS) vulnerability in its search functionality
Date: 2025-03
Affected: go/github.com/mudler/LocalAI
Attack vector: xss
Category: vulnerability-disclosure
Severity: Medium
CVE: CVE-2024-48057
CVE-2024-9900
CWE: CWE-115
CWE-352
CWE-79
CVSS: 5.4 (CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N)

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.


Mitigations:

Architectural layers (MAESTRO):