Intel

AIKIDO-2026-168553

lightrag-hku is vulnerable to Cross-Site Scripting (XSS)

Cross-Site Scripting (XSS)GHSA-xpjq-3w4w-w5wr Published 4 days ago

61

Medium Risk

This Affects:

PYTHONlightrag-hku
0.0.1 - 1.5.4
Fixed in 1.5.5
Are you affected? Scan for Free

TL;DR

The LightRAG WebUI chat renderer in ChatMessage.tsx renders assistant answer content as raw HTML using react-markdown with rehypeRaw and skipHtml={false} and no HTML sanitizer, element allow-list, or URL transform. Because answer content is derived from user-ingested documents, a client who can add a single document can store an HTML/JavaScript payload that executes in the browser of any user who later retrieves it. The injected script can read the auth token from localStorage and drive the API as the victim, escalating to full account takeover. The fix sanitizes untrusted chat Markdown before rendering.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and the WebUI renders answer content derived from documents that can be ingested by untrusted users.

Background info

lightrag-hku is vulnerable to Cross-Site Scripting (XSS) in versions 0.0.1 - 1.5.4.

How to fix this

Upgrade the lightrag-hku library to the patch version.