Skip to main content

LibreChat CVE-2025-66452

MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2025-12-11 security-advisories@github.com
5.3
CVSS 4.0 · Vendor: github
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Lure victim to attacker-controlled page
  2. Delivery
    Browser submits malformed JSON with HTML/JS payload
  3. Exploit
    express.json() SyntaxError reflects input unsanitized
  4. Execution
    Script executes in victim browser session
  5. Impact
    Steal 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).

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
No patch listed yet 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

Vendor (github) PRIMARY 5.3 MEDIUM
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
vuln.today AI 6.1 MEDIUM

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.

3.1 AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (github).

CVSS VectorVendor: github

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
Low
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

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

EPSS Score
0.2%
Top 89% exploitable
Prevalence
Medium
popular self-hosted open-source ChatGPT clone, not enterprise-ubiquitous
Exploit
POC
Public exploit code exists
Data Quality
4 sources
Confidence: Medium

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC Yes
EPSS 0.2%
Patch available No
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
Poc
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

46
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +26
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

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

cpe:2.3:a:librechat:librechat:*:*:*:*:*:*:*:*
CVE-2024-11170 HIGH POC
8.8 Mar 20

A vulnerability in danny-avila/librechat version git 81f2936 allows for path traversal due to improper sanitization of f

CVE-2024-10361 CRITICAL POC
9.1 Mar 20

An arbitrary file deletion vulnerability exists in danny-avila/librechat version v0.7.5-rc2, specifically within the /ap

CVE-2026-22252 CRITICAL POC
9.1 Jan 12

LibreChat before v0.8.2-rc2 allows any authenticated user to execute shell commands as root inside the container through

CVE-2025-8850 HIGH POC
8.8 Oct 30

LibreChat 0.7.9 lets an authenticated user turn off two-factor authentication on their own account without supplying a v

CVE-2025-66450 HIGH POC
8.6 Dec 11

Stored cross-site scripting and tracker injection in LibreChat 0.8.0 and earlier allow a user who can create a chat to c

CVE-2025-66201 HIGH POC
8.6 Nov 29

LibreChat is a ChatGPT clone with additional features. Rated high severity (CVSS 8.6), this vulnerability is remotely ex

CVE-2025-69222 HIGH POC
8.1 Jan 07

LibreChat 0.8.1-rc2 has SSRF in the Actions feature that allows authenticated users to make the server perform requests

CVE-2024-11171 HIGH POC
7.5 Mar 20

In danny-avila/librechat version git 0c2a583, there is an improper input validation vulnerability. Rated high severity (

CVE-2025-7104 HIGH POC
7.5 Sep 29

A mass assignment vulnerability exists in danny-avila/librechat, affecting all versions. Rated high severity (CVSS 7.5),

CVE-2025-8849 HIGH POC
7.5 Oct 31

Unbounded `key` and `value` parameters on the LibreChat 0.7.9 memory API (`POST /api/memories` and `PATCH /api/memories/

CVE-2024-11173 MEDIUM POC
6.5 Mar 20

An unhandled exception in the danny-avila/librechat repository, version git 600d217, can cause the server to crash, lead

CVE-2024-10366 MEDIUM POC
6.5 Mar 20

An improper access control vulnerability (IDOR) exists in the delete attachments functionality of danny-avila/librechat

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy