# CVE-2026-54025: LibreChat stored XSS in markdown artifact preview

Source: https://junglewise.ai/threats/cve-2026-54025-librechat-stored-xss-in-markdown-artifact-preview  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-06-25. Updated: 2026-06-25  
License: CC BY 4.0 with a link back

CVE-2026-54025 · Severity: medium · CVSS 5.4 · Published 2026-06-25

LibreChat, an open-source interface for AI models like ChatGPT, contains a security flaw in how it previews shared documents. An attacker can create a specially crafted conversation that, when shared and viewed by another user, automatically redirects the victim's browser to a malicious website. This could be used for phishing or to trick users into visiting dangerous pages while their session is active.

Technologies: [LibreChat](https://junglewise.ai/threats/technologies/librechat). Vendors: [LibreChat](https://junglewise.ai/threats/vendors/librechat).

## Quick answers

**Is CVE-2026-54025 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-54025 being exploited in the wild.

**How severe is CVE-2026-54025?** Medium severity, with a CVSS score of 5.4, published 25 June 2026.

**Which products and versions are affected?** LibreChat < 0.8.4-rc1.

**Is there a fix for CVE-2026-54025?** No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.

**How is CVE-2026-54025 attacked?** It is attacked over the network, in a network appliance.

**Am I affected by CVE-2026-54025?** Check whether you run LibreChat at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

A stored Cross-Site Scripting (XSS) vulnerability exists in LibreChat's markdown artifact preview pipeline due to improper escaping in the 'marked' library (v15.0.12). When the 'generateMarkdownHtml' function in 'client/src/utils/markdown.ts' uses a custom image renderer that falls back to the default renderer for safe URLs, the default renderer fails to HTML-escape double-quote characters in the image 'alt' text. An authenticated attacker can import a crafted conversation JSON containing a malicious markdown artifact and generate a public share link. When a victim views the shared link, the unescaped 'alt' text breaks out of the attribute to inject an 'onload' event handler, executing arbitrary JavaScript within the Sandpack preview iframe. This can be used to perform a top-level window redirection since LibreChat lacks restrictive Content-Security-Policy (CSP) or X-Frame-Options headers. The issue is fixed in version 0.8.4-rc1.

## Affected products

- danny-avila LibreChat < 0.8.4-rc1

## Timeline

- 2026-06-02: advisory: GitHub Security Advisory published
- 2026-06-25: disclosed: NVD publication date

## References

- [https://github.com/danny-avila/LibreChat/security/advisories/GHSA-3phr-62qf-cxf3](https://github.com/danny-avila/LibreChat/security/advisories/GHSA-3phr-62qf-cxf3)

## Related threats

- [LibreChat 2FA bypass via unauthenticated backup code regeneration](https://junglewise.ai/threats/cve-2026-54040-librechat-2fa-bypass-via-unauthenticated-backup-code-regeneration)
- [LibreChat resource exhaustion via missing rate limiting in duplicate endpoint](https://junglewise.ai/threats/cve-2026-54037-librechat-resource-exhaustion-via-missing-rate-limiting-in)
- [LibreChat SSRF via custom endpoint baseURL](https://junglewise.ai/threats/cve-2026-54033-librechat-ssrf-via-custom-endpoint-baseurl)
- [LibreChat token theft via missing OAuth resource validation in MCP](https://junglewise.ai/threats/cve-2026-54030-librechat-token-theft-via-missing-oauth-resource-validation-in)
- [danny-avila LibreChat IDOR in message deletion endpoint](https://junglewise.ai/threats/cve-2026-54029-danny-avila-librechat-idor-in-message-deletion-endpoint)
