3.7low
Lobe Chat has IDOR in Knowledge Base File Removal that Allows Cross User File Deletion
- Severity
- 3.7low CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.24% (higher than 15% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-j7xp-4mg9-x28r
Description
LobeChat is an open source chat application platform. Prior to version 2.0.0-next.193, `knowledgeBase.removeFilesFromKnowledgeBase` tRPC ep allows authenticated users to delete files from any knowledge base without verifying ownership. `userId` filter in the database query is commented out, so it's enabling attackers to delete other users' KB files if they know the knowledge base ID and file ID. While the vulnerability is confirmed, practical exploitation requires knowing target's KB ID and target's file ID. These IDs are random and not easily enumerable. However, IDs may leak through shared links, logs, referrer headers and so on. Missing authorization check is a critical security flaw regardless. Users should upgrade to version 2.0.0-next.193 to receive a patch.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| lobehub lobe-chat | < 2.0.0-next.193 | CVE List |
| @lobehub/chat (npm) | up to 1.143.2 | GitHub Advisory Database |
All scores
| GitHub_M | 3.7low CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N |
| GitHub | 3.7low CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N |
Classification
What each source says
CVE List
LobeChat is an open source chat application platform. Prior to version 2.0.0-next.193, `knowledgeBase.removeFilesFromKnowledgeBase` tRPC ep allows authenticated users to delete files from any knowledge base without verifying ownership. `userId` filter in the database query is commented out, so it's enabling attackers to delete other users' KB files if they know the knowledge base ID and file ID. While the vulnerability is confirmed, practical exploitation requires knowing target's KB ID and target's file ID. These IDs are random and not easily enumerable. However, IDs may leak through shared links, logs, referrer headers and so on. Missing authorization check is a critical security flaw regardless. Users should upgrade to version 2.0.0-next.193 to receive a patch.
GitHub Advisory Database
Summary
knowledgeBase.removeFilesFromKnowledgeBase tRPC ep allows authenticated users to delete files from any knowledge base without verifying ownership.
Details
userId filter in the database query is commented out, so it's enabling attackers to delete other users' KB files if they know the knowledge base ID and file ID.
PoC
ATTACKER_TOKEN="xx"
VICTIM_KB="kb_tuLBfskdDN1r"
VICTIM_FILE="file_v5wCNLqSaoPp"
curl -X POST "https://localhost/trpc/lambda/knowledgeBase.removeFilesFromKnowledgeBase?batch=1" -H "Content-Type: application/json" -b "__Secure-better-auth.session_token=$ATTACKER_TOKEN" -d '{"0":{"json":{"knowledgeBaseId":"'"$VICTIM_KB"'","ids":["'"$VICTIM_FILE"'"]}}}'
Response:
{"result":{"data":{"json":{"command":"DELETE","rowCount":1,"oid":null,"rows":[],"fields":[]}}}}
Impact
An attacker can delete files from any user's KB. RAG/AI functionality broken when files removed. It could cause loss of important documents, proprietary data etc.
While the vuln is confirmed, practical exploitation requires knowing target's KB ID and target's file ID. These IDs are random and not easily enumerable. However, IDs may leak through shared links, logs, referrer headers and so on. Missing authorization check is a critical security flaw regardless.
NVD (es)
LobeChat es una plataforma de aplicación de chat de código abierto. Antes de la versión 2.0.0-next.193, el endpoint tRPC 'knowledgeBase.removeFilesFromKnowledgeBase' permite a los usuarios autenticados eliminar archivos de cualquier base de conocimiento sin verificar la propiedad. El filtro 'userId' en la consulta de la base de datos está comentado, lo que permite a los atacantes eliminar archivos de KB de otros usuarios si conocen el ID de la base de conocimiento y el ID del archivo. Aunque la vulnerabilidad está confirmada, la explotación práctica requiere conocer el ID de KB del objetivo y el ID del archivo del objetivo. Estos ID son aleatorios y no son fácilmente enumerables. Sin embargo, los ID pueden filtrarse a través de enlaces compartidos, registros, encabezados de referencia y demás. La falta de verificación de autorización es una falla de seguridad crítica de todos modos. Los usuarios deben actualizar a la versión 2.0.0-next.193 para recibir un parche.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-23522 changed 2026-01-20 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-j7xp-4mg9-x28r changed 2026-02-03 | CC-BY-4.0 |
| NVD | CVE-2026-23522 changed 2026-06-17 | Public domain |