Intel

AIKIDO-2026-168553

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

CVE-2026-86062Published Aug 3, 2026
August 3, 2026

61

CVE Score

Medium

Cross-Site Scripting (XSS)

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.

How do I fix this?

Upgrade the lightrag-hku library to the patch version.

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.

Versions

0.0.1 - 1.5.4

Fixed in 1.5.5

Background info

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

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea