Vulnerability in LibreChat's Image Renderer Leading to Code Injection
CVE-2026-54025
What is CVE-2026-54025?
LibreChat, an advanced ChatGPT clone supporting multiple AI providers, suffers from a code injection vulnerability in its markdown artifact preview pipeline. An issue arises from the marked library version 15.0.12, which does not properly HTML-escape double-quote characters in image alt text. This flaw allows attackers to inject malicious payloads by crafting specific alt text. Due to a fallback mechanism to a built-in renderer when a URL fails the isSafeUrl check, unescaped alt text is inserted into an HTML attribute. This manipulation enables an attacker to execute arbitrary event handlers in the victim's browser when the crafted HTML is rendered. The vulnerability has been addressed in LibreChat version 0.8.4-rc1, making it essential for users to update their installations promptly.
Affected Version(s)
LibreChat < 0.8.4-rc1
