CVE-2024-48057: XSS and CSRF in LocalAI delete model API
CVE-2024-48057 is a stored XSS and CSRF vulnerability in LocalAI's delete model API that allows attackers to inject malicious scripts executed when users access the homepage. The vulnerability affects LocalAI versions 2.20.1 and earlier.
What happened
LocalAI versions 2.20.1 and earlier are vulnerable to stored Cross-Site Scripting (XSS) and Cross-Site Request Forgery (CSRF) when the delete model API is called with improper parameters.
A malicious payload injected via the delete model API endpoint is stored temporarily and executes when a user accesses the homepage.
Reported impact
The vulnerability allows attackers to inject and execute malicious JavaScript code in the context of a user's session.
The combination of stored XSS with CSRF exposure enables unauthorized requests and code execution.
Index analysis
The vulnerability exists in the delete model API where inappropriate parameters are not properly sanitized before storage and rendering.
Attackers can exploit this by sending a POST request to /browse/install/model/ with embedded script payloads that trigger when the homepage is accessed.
Governance controls
The fix suggestion recommends strictly controlling URL parameters to allow only numbers, letters, and limited special symbols.
Classification
Sources and evidence
Sources not yet published
This record was researched and written by the Index from original reporting. Its sources are still being verified by an editor, and they are listed here once that check is complete. Until then the record carries no reviewer.