CVE-2026-54025

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.
Configurations

Configuration 1 (hide)

cpe:2.3:a:librechat:librechat:*:*:*:*:*:*:*:*

History

29 Jun 2026, 16:02

Type Values Removed Values Added
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 - Exploit, Mitigation, Vendor Advisory
First Time Librechat librechat
Librechat
CPE cpe:2.3:a:librechat:librechat:*:*:*:*:*:*:*:*

25 Jun 2026, 19:16

Type Values Removed Values Added
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 -

25 Jun 2026, 17:16

Type Values Removed Values Added
New CVE

Information

Published : 2026-06-25 17:16

Updated : 2026-06-29 16:02


NVD link : CVE-2026-54025

Mitre link : CVE-2026-54025

CVE.ORG link : CVE-2026-54025


JSON object : View

Products Affected

librechat

  • librechat
CWE
CWE-79

Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')