CVE-2026-54025: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in danny-avila LibreChat
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.
AI Analysis
Technical Summary
LibreChat versions before 0.8.4-rc1 use the marked library v15.0.12 for markdown rendering. The vulnerability occurs because the marked library's default renderer does not HTML-escape double-quote characters in image alt text when a custom renderer falls back to it. LibreChat's generateMarkdownHtml function installs a custom image renderer that returns false for URLs passing the isSafeUrl allowlist, causing fallback to the vulnerable default renderer. An attacker can craft alt text containing a double-quote and an event handler (e.g., " onload="payload) to break out of the alt attribute and inject malicious JavaScript. This malicious HTML is then assigned to innerHTML inside a Sandpack preview iframe, enabling script execution in the victim's browser context. The vulnerability is resolved in LibreChat 0.8.4-rc1.
Potential Impact
Successful exploitation allows an attacker to execute arbitrary JavaScript in the context of the victim's browser when viewing the markdown preview in LibreChat. This can lead to information disclosure or other client-side impacts. The CVSS 3.1 base score is 5.4 (medium severity), reflecting network attack vector, low attack complexity, required privileges and user interaction, and partial confidentiality and integrity impact without availability impact.
Mitigation Recommendations
This vulnerability is fixed in LibreChat version 0.8.4-rc1. Users should upgrade to version 0.8.4-rc1 or later to remediate this issue. No official patch or workaround is indicated beyond upgrading. Patch status is not explicitly stated beyond the fix in 0.8.4-rc1, so users should verify with the vendor for the latest remediation guidance.
CVE-2026-54025: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in danny-avila LibreChat
Description
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.
CVSS v3.1
Score 5.4medium
Affected software
pkg:github/danny-avila/LibreChatRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
LibreChat versions before 0.8.4-rc1 use the marked library v15.0.12 for markdown rendering. The vulnerability occurs because the marked library's default renderer does not HTML-escape double-quote characters in image alt text when a custom renderer falls back to it. LibreChat's generateMarkdownHtml function installs a custom image renderer that returns false for URLs passing the isSafeUrl allowlist, causing fallback to the vulnerable default renderer. An attacker can craft alt text containing a double-quote and an event handler (e.g., " onload="payload) to break out of the alt attribute and inject malicious JavaScript. This malicious HTML is then assigned to innerHTML inside a Sandpack preview iframe, enabling script execution in the victim's browser context. The vulnerability is resolved in LibreChat 0.8.4-rc1.
Potential Impact
Successful exploitation allows an attacker to execute arbitrary JavaScript in the context of the victim's browser when viewing the markdown preview in LibreChat. This can lead to information disclosure or other client-side impacts. The CVSS 3.1 base score is 5.4 (medium severity), reflecting network attack vector, low attack complexity, required privileges and user interaction, and partial confidentiality and integrity impact without availability impact.
Mitigation Recommendations
This vulnerability is fixed in LibreChat version 0.8.4-rc1. Users should upgrade to version 0.8.4-rc1 or later to remediate this issue. No official patch or workaround is indicated beyond upgrading. Patch status is not explicitly stated beyond the fix in 0.8.4-rc1, so users should verify with the vendor for the latest remediation guidance.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-06-11T16:57:50.018Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a3d5b504853345fc1337280
Added to database: 06/25/2026, 16:46:08 UTC
Last enriched: 06/25/2026, 17:02:36 UTC
Last updated: 06/25/2026, 21:28:41 UTC
Views: 5
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.