CVE-2026-54025: LibreChat: Stored XSS via unescaped image alt text in markdown artifact preview

Published Jun 25, 2026
·
Updated

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.

Affected Software

2 affected components
LibreChat<0.8.4-rc1
librechat librechat<=0.7.8

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade LibreChat to a version that resolves this vulnerability.

    Fixed in 0.8.4-rc1

Event History

Jun 25, 2026
CVE Published
via MITRE·03:53 PM
Data Sourced
via MITRE·03:53 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·05:16 PM
DescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-54025?

The severity of CVE-2026-54025 is medium with a score of 5.4 according to the CVSS v3.1 metrics.

2

How do I fix CVE-2026-54025?

To fix CVE-2026-54025, upgrade LibreChat to version 0.8.4-rc1 or later, where the vulnerability has been addressed.

3

What type of vulnerability is CVE-2026-54025?

CVE-2026-54025 is classified as a Stored XSS (Cross-Site Scripting) vulnerability.

4

What impact does CVE-2026-54025 have on users?

CVE-2026-54025 could allow an attacker to execute arbitrary JavaScript in the context of the user's session through unescaped image alt text.

5

Who is affected by CVE-2026-54025?

Users of LibreChat versions prior to 0.8.4-rc1 are affected by CVE-2026-54025.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203