LibreChat RAG API Log-Injection Vulnerability

Vulnerability

A log-injection vulnerability has been identified in the LibreChat RAG API version 0.7.0. This vulnerability arises from improper sanitization of user input before it is logged, allowing authenticated attackers to manipulate log entries by inserting carriage-return or line-feed characters. This could obscure malicious activities or mislead forensic investigations. Additionally, if the altered logs are processed by insecure log-management tools or viewed through a web-based administrative console, it could lead to further attacks, such as cross-site scripting or remote command execution.

Impact

Exploitation of this vulnerability allows authenticated attackers to forge log entries, potentially obfuscating malicious activities and misdirecting investigations. This manipulation could be used to impersonate other users or, if the logs are processed by insecure log-management tools, escalate into cross-site scripting or remote command execution attacks.

Remediation

No official patch is available for this vulnerability. However, it can be mitigated by sanitizing input logs to filter out malicious data, disabling the pgvector extension in PostgreSQL if not in use, and validating RAG output before using it with other tools to prevent indirect prompt injection. These strategies can be combined for enhanced protection.

Added: Mar 16, 2026, 4:20 PM
Updated: Mar 16, 2026, 4:20 PM

Vulnerability Rating

Custom Algorithm
spread
1.4
impact
0.8
exploitability
4.9
remediation
7.9
relevance
4.0
threat
0.0
urgency
2.9
incentive
0.0

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