LibreChat Log Injection Vulnerability

Vulnerability

A log injection vulnerability exists in LibreChat versions prior to 0.7.6. The issue arises in the '/code/download/:sessionId/:fileId' and '/download/:userId/:file_id' APIs, where the 'sessionId', 'fileId', 'userId', and 'file_id' parameters are not properly validated or sanitized. This lack of validation can lead to log injection attacks, potentially distorting monitoring and investigation data, evading security detection, and complicating maintenance and operations.

Impact

Exploitation of this vulnerability allows for log injection, which can mislead monitoring efforts, disrupt investigative processes, bypass security alerts, and create challenges in system maintenance and operation.

Reproduction

To reproduce this vulnerability, send a request to the '/code/download/:sessionId/:fileId' or '/download/:userId/:file_id' endpoints with crafted sessionId, fileId, userId, or file_id parameters. The absence of proper validation will allow the injection of malicious log data.

Remediation

Users are advised to update to LibreChat version 0.7.6 or later, where this vulnerability has been addressed.

Added: Jun 9, 2025, 7:46 PM
Updated: Jun 9, 2025, 7:46 PM

Vulnerability Rating

Custom Algorithm
spread
1.4
impact
0.6
exploitability
5.9
remediation
0.0
relevance
0.0
threat
4.8
urgency
2.9
incentive
1.7

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.