CVE-2024-9900: LocalAI XSS Vulnerability in Search Functionality
Summary
CVE-2024-9900: LocalAI Cross-Site Scripting (XSS) vulnerability in its search functionality in github.com/mudler/LocalAI. Affected versions are not published. No fix is published. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
LocalAI is an open-source project hosted on GitHub, designed to facilitate AI model deployment and management. It provides a user-friendly interface for searching and interacting with various AI models. However, its search functionality has been found to be vulnerable to Cross-Site Scripting (XSS) attacks, which could allow malicious users to inject scripts into web pages viewed by other users.
Vulnerability Detail
The LocalAI Cross-Site Scripting (XSS) vulnerability arises from improper handling of user input in its search functionality. This flaw allows attackers to inject malicious scripts that can execute in the context of other users' browsers, potentially leading to data theft, session hijacking, or other malicious actions. The vulnerability affects all versions of LocalAI prior to v2.22.0, making it critical for users to address this issue promptly.
How To Fix
No fixed version is published for this vulnerability.
Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →
Workaround
As a temporary workaround, users can sanitize user inputs in the search functionality to prevent script injection. Implementing input validation and encoding output can help mitigate the risk until the package is updated.
Conclusion
The LocalAI package has a critical Cross-Site Scripting (XSS) vulnerability in its search functionality, affecting all versions prior to v2.22.0. Users are strongly advised to update to the latest version to mitigate potential security risks. Temporary workarounds can be implemented, but updating is the best long-term solution.
See every vulnerability recorded for github.com/mudler/LocalAI →
FAQ
XSS is a security vulnerability that allows attackers to inject malicious scripts into web pages viewed by other users, potentially compromising their data and security.
You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.
The risks include data theft, session hijacking, and unauthorized actions performed on behalf of users, which can lead to severe security breaches.
Yes, you can implement input validation and output encoding to sanitize user inputs in the search functionality as a temporary measure.
Additional information can be found in the advisory at https://pkg.go.dev/vuln/GO-2025-3542.
Related vulnerabilities
Recent vulnerabilities recorded for github.com/mudler/LocalAI.