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

- Severity: Medium 5.4 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.16%, higher than 5% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-06-25T15:53:17.026Z
- Modified: 2026-10-25T22:10:00.150Z
- Weaknesses: CWE-79
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

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

(As written by CVE List.)

## Affected

- danny-avila LibreChat: < 0.8.4-rc1
- librechat librechat: up to 0.7.8

## References

- <https://github.com/danny-avila/LibreChat/security/advisories/GHSA-3phr-62qf-cxf3> (exploit, mitigation, vendor-advisory)

## Sources

- CVE List: [CVE-2026-54025](https://www.cve.org/CVERecord?id=CVE-2026-54025), CVE Terms of Use, modified 2026-06-25
- NVD: [CVE-2026-54025](https://nvd.nist.gov/vuln/detail/CVE-2026-54025), Public domain, modified 2026-10-25

---

Page: https://cve.day/CVE-2026-54025 · Whole record: https://cve.day/CVE-2026-54025.json · Rebuilt by cve.day 2026-11-25T22:59:26.384Z
