CVE-2024-48057 LocalAI Cross-site Scripting vulnerability

Medium 6.1 Published Updated

Attackers can inject malicious scripts via the delete model API, leading to stored XSS that executes when users visit the homepage.

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-48057?

CVE-2024-48057 is a medium-severity cross-site scripting vulnerability in n/a, published on 4 Nov 2024. 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

localai <=2.20.1 is vulnerable to Cross Site Scripting (XSS). When calling the delete model API and passing inappropriate parameters, it can cause a one-time storage XSS, which will trigger the payload when a user accesses the homepage.

Weakness: CWE-79, CWE-352

Which versions are affected by CVE-2024-48057?

3 open source packages ship an affected version, including github.com/mudler/LocalAI. It affects 1 product.

PackageAffectedFixed in
github.com/mudler/LocalAI GoAll versionsNone
github.com/mudler/LocalAI GoAll versions to 2.20.1None
github.com/mudler/LocalAI GoAll versions to 2.20.1None

Products include Mudler Localai.

How do I fix CVE-2024-48057?

Upgrade to a fixed version.

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-48057 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-48057 exists.

Sources

Also known as CVE-2024-9901, GHSA-ghx4-cgxw-7h9p, GO-2024-3253.

Is CVE-2024-48057 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free