LibreChat
CVE-2025-66452
MEDIUM
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessLure victim to attacker-controlled page
-
DeliveryBrowser submits malformed JSON with HTML/JS payload
-
Exploitexpress.json() SyntaxError reflects input unsanitized
-
ExecutionScript executes in victim browser session
-
ImpactSteal session data or act as user
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires that the affected endpoint's JSON error response (the express.json() SyntaxError containing reflected user input) is NOT served with a strictly enforced non-HTML Content-Type - the description explicitly scopes the XSS risk to 'if Content-Type isn't strictly enforced.' The attacker must also induce a victim to send a crafted request containing a malformed JSON body with embedded HTML/JavaScript (UI:P / passive user interaction), e.g. via a malicious link or auto-submitting page. Limiting factors: impact depends on how the error response is rendered by the browser (content-type sniffing/handling), the reflected XSS is non-persistent so each victim must be individually lured, and only LibreChat versions 0.8.0 and below are affected. No authentication is required (PR:N). |
| Impact | This is a moderate-severity reflected XSS (CWE-79) in LibreChat ≤0.8.0 where Express's express.json() SyntaxError, which embeds the offending user input, is reflected into HTTP error responses with no sanitizing error handler. The provided CVSS is a 4.0 vector (5.3, AV:N/AC:L/PR:N/UI:P) indicating a network-reachable, unauthenticated flaw with low confidentiality and integrity impact but requiring passive user interaction (UI:P) - consistent with a reflected rather than stored XSS. Real-world risk signals are modest and internally consistent: EPSS is 0.22% (11th percentile, low probability of exploitation), the issue is NOT on the CISA KEV list, and there is no evidence of active exploitation. A publicly available exploit reference exists (the GitHub Security Advisory GHSA-q6c5-gvj5-c264), but POC availability is a distinct signal from active exploitation and should not be conflated with it. Critically, the vulnerability description itself qualifies the impact as conditional - XSS only arises 'if Content-Type isn't strictly enforced' - meaning exploitability depends on deployment/configuration specifics and attacker ability to control how the error is rendered. Net assessment: a legitimate but lower-tier priority (reflected XSS, user-interaction-dependent, conditional on content-type handling), not a high-urgency widespread threat. Mitigating factor to verify: no official fix existed at publication, so defenders cannot simply patch and must apply compensating controls. |
| Exploit ScenarioDerived | An attacker crafts a URL or form that causes a victim's browser to submit a malformed JSON body to a LibreChat endpoint, embedding HTML/JavaScript in the payload. Because express.json() reflects the invalid input in its SyntaxError message and no error handler sanitizes it, the script is returned in the response and can execute in the victim's browser if the response Content-Type is not strictly enforced as non-HTML. A publicly available exploit reference exists in the vendor's GitHub Security Advisory; successful attacks require luring the victim into triggering the crafted request (UI:P). |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 07, 2026
Reflected cross-site scripting (CWE-79) affects LibreChat versions 0.8.0 and below because the application has no handler for JSON parsing errors, so the SyntaxError raised by express.json() - which embeds the offending request body - is returned to the client and can be rendered as HTML/JavaScript if the response Content-Type is not strictly enforced. Exploitation is remote and unauthenticated but requires passive user interaction: an attacker must lure a victim into submitting a malformed JSON request containing embedded markup, after which the reflected script executes in the victim's browser session. Publicly available exploit code exists and is referenced by the GitHub advisory, but there is currently no evidence of active exploitation in the wild; EPSS is low at 0.22% (11th percentile) and the assessed impact is limited (C:L/I:L), with no persistence and a fix not available at the time of publication.
RemediationAI
No vendor-released patch was identified at the time of analysis, and the advisory itself states the issue has no fix at publication; monitor the GitHub advisory GHSA-q6c5-gvj5-c264 and the LibreChat repository for a patched release. Until then, the highest-value mitigation is to implement a custom Express error-handling middleware that catches SyntaxError from express.json() and returns a generic, non-reflective message, ensuring the raw request body is never echoed back - this eliminates the vulnerability at its source and has no functional side effect beyond dropping the developer-friendly payload echo. As defense in depth, force all error responses to a non-HTML Content-Type such as application/json (or text/plain where appropriate), since the XSS condition explicitly depends on the response being interpreted as HTML; pair this with the X-Content-Type-Options: nosniff header to defeat MIME-sniffing by legacy browsers, accepting that this may change how some clients render error output. A restrictive Content-Security-Policy with no unsafe-inline script sources further reduces execution risk if reflection still occurs, at the cost of requiring CSP-compatible front-end code. Finally, sanitize and length-limit any error text surfaced to clients, and consider a reverse proxy or WAF rule that rewrites or blocks error responses containing angle brackets or script markers.
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
LibreChat is a Node.js/Express web application (a feature-extended ChatGPT clone). Express's built-in express.json() body parser throws a SyntaxError when it receives a malformed JSON payload, and that error message includes a snippet of the raw user input. Because no custom error-handling middleware sanitizes or reshapes this error, the reflected payload flows unmodified into the HTTP error response. The root cause class is CWE-79 (Improper Neutralization of Input During Web Page Generation / Cross-Site Scripting): the framework's error object is treated as trusted output and written into the response without context-aware encoding. The XSS only materializes when the response is served or interpreted with an HTML Content-Type - e.g. through MIME sniffing or a misconfigured proxy/Content-Security-Policy - which the advisory calls out as a precondition. The CPE entry cpe:2.3:a:librechat:librechat:*:*:*:*:*:*:*:* indicates the vulnerable component is LibreChat itself across versions up to and including 0.8.0, and the CVSS:4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:P) confirms network reachability, no attack complexity or preconditions, no authentication, and passive user interaction.
Know when Librechat gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N
Reflected XSS reachable over the network without auth (PR:N) but requiring the victim to trigger the request (UI:R) and crossing into the browser context (S:C); low C/I, no availability impact.
Primary rating from Vendor (github).
CVSS VectorVendor: github
DescriptionCVE.org
LibreChat is a ChatGPT clone with additional features. In versions 0.8.0 and below, there is no handler for JSON parsing errors; SyntaxError from express.json() includes user input in the error message, which gets reflected in responses. User input (including HTML/JavaScript) can be exposed in error responses, creating an XSS risk if Content-Type isn't strictly enforced. This issue does not have a fix at the time of publication.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.
Affected Products (CPE)CVE.org
A vulnerability in danny-avila/librechat version git 81f2936 allows for path traversal due to improper sanitization of f
An arbitrary file deletion vulnerability exists in danny-avila/librechat version v0.7.5-rc2, specifically within the /ap
LibreChat before v0.8.2-rc2 allows any authenticated user to execute shell commands as root inside the container through
LibreChat 0.7.9 lets an authenticated user turn off two-factor authentication on their own account without supplying a v
Stored cross-site scripting and tracker injection in LibreChat 0.8.0 and earlier allow a user who can create a chat to c
LibreChat is a ChatGPT clone with additional features. Rated high severity (CVSS 8.6), this vulnerability is remotely ex
LibreChat 0.8.1-rc2 has SSRF in the Actions feature that allows authenticated users to make the server perform requests
In danny-avila/librechat version git 0c2a583, there is an improper input validation vulnerability. Rated high severity (
A mass assignment vulnerability exists in danny-avila/librechat, affecting all versions. Rated high severity (CVSS 7.5),
Unbounded `key` and `value` parameters on the LibreChat 0.7.9 memory API (`POST /api/memories` and `PATCH /api/memories/
An unhandled exception in the danny-avila/librechat repository, version git 600d217, can cause the server to crash, lead
An improper access control vulnerability (IDOR) exists in the delete attachments functionality of danny-avila/librechat
NVD
CVE.org
EPSS
GitHub
Exploit-DB