CVE-2024-8251 Prisma Injection in mintplex-labs/anything-llm

Medium 5.3 Published Updated

Attackers can inject Prisma queries via API endpoints to access all user chat data in embedded mode.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is CVE-2024-8251?

CVE-2024-8251 is a medium-severity SQL injection vulnerability in Mintplexlabs Anythingllm, published on 20 Mar 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

A vulnerability in mintplex-labs/anything-llm prior to version 1.2.2 allows for Prisma injection. The issue exists in the API endpoint "/embed/:embedId/stream-chat" where user-provided JSON is directly taken to the Prisma library's where clause. An attacker can exploit this by providing a specially crafted JSON object, such as {"sessionId":{"not":"a"}}, causing Prisma to return all data from the table. This can lead to unauthorized access to all user queries in embedded chat mode.

Weakness: CWE-89

Which versions are affected by CVE-2024-8251?

It affects 1 product.

Products include Mintplexlabs Anythingllm.

How do I fix CVE-2024-8251?

No fix has been published for CVE-2024-8251 yet. Limit exposure of the affected software until one is available.

Use parameterised queries everywhere and never build SQL by joining strings. Upgrade affected software first; a web application firewall only buys time. More about SQL injection.

Is CVE-2024-8251 being exploited?

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

All Mintplexlabs Anythingllm vulnerabilities

Sources

Also known as GHSA-f6rh-g2v9-v6qp.

Is CVE-2024-8251 in your software?

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

Check your SBOMs for free