Skip to content
CSRF Disclosed report Beginner CVE-2024-3135

LocalAI cross-site request forgery vulnerability

LocalAI accepts simple request content-types without CSRF tokens, so a malicious webpage can make a victim's local instance perform resource-intensive API calls. An attacker could exhaust system resources, consume credits, and fill disk space.

github.com/go-skynet/LocalAI

Originally disclosed on huntr

A Cross-Site Request Forgery (CSRF) vulnerability exists in the mudler/localai application, allowing attackers to craft malicious webpages that, when visited by a victim, perform unauthorized actions on the victim's local LocalAI instance without their consent. This vulnerability enables attackers to exhaust system resources, consume credits, and fill disk space by making numerous resource-intensive API calls, such as generating images or uploading files. The vulnerability stems from the application's acceptance of simple request content-types without requiring CSRF tokens or implementing other CSRF mitigation measures. Successful exploitation does not require network access to the vulnerable LocalAI environment.

From the GitHub Advisory Database (GHSA-jhvf-7c85-3c9g, CC BY 4.0).

The original report as published on the GitHub Advisory Database. Images and videos are our own copies; raw HTML is shown as text. View it on GitHub Advisory Database.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the application accepts simple request content-types without requiring CSRF tokens or other CSRF mitigations.

Impact

An attacker could exhaust system resources, consume credits, and fill disk space by making numerous resource-intensive API calls, such as generating images or uploading files.

What the attacker needed

Victim visits a malicious webpage; LocalAI running locally

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

When you visit a website, your browser can also send requests to other services running on your own computer, like LocalAI. Because LocalAI does not check that requests come from its own pages, a malicious site can trigger actions such as generating images or uploading files. This can use up your computer's resources or disk space without you knowing.

What is CSRF?

Another site makes a signed-in user's browser perform an action they did not intend.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site request forgery (CSRF)

The lesson behind this report.

Another site makes a signed-in user's browser perform an action they did not intend.