CVE-2026-54043 in LibreChat
Summary
by MITRE • 11/20/2026
LibreChat is an enhanced ChatGPT clone that supports multiple AI providers. Prior to 0.8.7, packages/data-schemas/src/methods/file.ts updateFileUsage accepts chat attachment files[].file_id values without restricting the lookup to the authenticated owner. An authenticated attacker who obtains another user's file identifier, including through GET /api/share/{shareId} for a shared conversation, can attach that file to a chat, causing extracted document text to enter the model context. The same operation can remove expiration metadata from the victim file. This issue is fixed in version 0.8.7.
If you want to get the best quality for vulnerability data then you always have to consider VulDB.
Analysis
by VulDB Data Team • 11/20/2026
The vulnerability identified in LibreChat prior to version 0.8.7 represents a critical failure in object-level access control within the application's backend API logic. Specifically, the function updateFileUsage located at packages/data-schemas/src/methods/file.ts fails to validate that the file identifier provided by the client belongs to the currently authenticated user session. This architectural flaw allows any authenticated user to manipulate metadata and state associated with files owned by other users, provided they can obtain a valid file identifier. The root cause lies in the absence of ownership verification during the update operation, treating all file IDs as public resources accessible for modification regardless of their actual owner.
An attacker can exploit this vulnerability through multiple vectors. One primary method involves leveraging the GET /api/share/{shareId} endpoint to retrieve details from shared conversations. These shared conversation objects often contain references or identifiers for files attached within those chats. By extracting a file_id associated with another user's private data, an authenticated attacker can subsequently invoke the updateFileUsage function using that stolen identifier. This bypasses standard authorization checks because the system only verifies if the requester is logged in, not whether they have permission to interact with the specific resource being modified.
The operational impact of this vulnerability extends beyond simple information disclosure or unauthorized modification. When an attacker attaches a victim's file to their own chat session using the compromised identifier, the application processes and extracts text from that document into the model context. This effectively exposes sensitive content contained within the victim's documents to the AI model processing pipeline, potentially leading to data leakage if logs are retained or if the model is configured in ways that expose training data. Furthermore, the attacker can remove expiration metadata associated with the victim's file. This action may prevent automatic cleanup of temporary files, causing storage bloat on the server side and potentially keeping sensitive data accessible for longer than intended by the original owner, thereby increasing the window of exposure to other potential threats or unauthorized access attempts.
From a classification perspective, this issue aligns closely with CWE-639, which describes authorization bypass via indirect reference manipulation. The attacker manipulates an object identifier (file_id) that is not directly controlled but influences system behavior without proper verification of ownership. In the context of the MITRE ATT&CK framework, this technique corresponds to T1078, Valid Accounts, as it relies on legitimate authentication credentials combined with a logic flaw in resource access control rather than exploiting a software bug like buffer overflow or injection. The exploitation path also touches upon data exfiltration concepts where internal resources are accessed outside of their intended scope.
To mitigate this vulnerability and prevent similar issues in future development cycles, strict object-level authorization checks must be implemented for all API endpoints that interact with user-specific resources. Developers should ensure that every request modifying or accessing a file validates the relationship between the authenticated user's session ID and the owner field associated with the target resource identifier. Additionally, implementing principle of least privilege ensures that users can only perform actions on objects they explicitly own unless shared permissions are clearly defined and enforced at the database query level rather than relying solely on client-supplied identifiers. Upgrading to version 0.8.7 or later resolves this issue by patching the updateFileUsage method to include proper ownership validation before allowing any metadata updates or file attachments linked to external user data.