Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessReach unauthenticated /api/chat (default whitelist)
-
DeliverySubmit target question with crafted conversation_history
-
ExploitInjected history steers generated answer
-
ExecutionPoisoned answer stored under history-free cache key
-
ImpactAuthenticated /query users served poisoned answer with real references
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V4 - API and Web Service Acceptance of extraneous untrusted data
|
| Exploitation Conditions | Exploitation requires LightRAG running with the default WHITELIST_PATHS=/health,/api/* so that the Ollama-compatible POST /api/chat write path is reachable unauthenticated, plus ENABLE_LLM_CACHE left enabled (default) and a cache-backed mode (default 'mix'; bypass mode and streaming responses are not cached). Three concrete limits bound exploitation: (1) first-writer-wins - the target question must not already be cached, since a cache hit returns the stored answer and never reaches the model to write; (2) the attacker must match the victim's exact query text, mode, TOP_K, and every other keyed parameter; (3) the injected conversation_history only changes the answer insofar as the model actually follows the injected instruction. The bundled WebUI is not exposed (history_turns pinned to 0); only external integrations that send conversation_history (notably Ollama-compatible clients on /api/chat) are affected. Vendor workarounds that fully remove the exposure: set WHITELIST_PATHS=/health, set ENABLE_LLM_CACHE=false, or stop sending conversation_history from clients; after upgrading or mitigating, clear persisted entries via POST /documents/clear_cache since the cache has no TTL. The vendor states upgrading to 1.5.5 is the complete fix. |
| Impact | This is a genuine integrity flaw but a moderate-priority one, not a high-urgency emergency. The CVSS 3.1 vector (AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:N, 6.5 Medium) correctly captures the shape: network-reachable and unauthenticated on the write side (PR:N, via the default WHITELIST_PATHS=/health,/api/*), but with high attack complexity (AC:H) that is well-justified by three stacked preconditions the advisory documents - first-writer-wins (the cache is read before write, so the target question must not already be cached), an exact cache-key match on query text/mode/TOP_K/all keyed parameters, and a prompt-injection that the model must actually follow. The primary impact is integrity (I:H): an attacker can durably set the answer authenticated users receive, persisting in kv_store_llm_response_cache.json with no TTL across restarts. Confidentiality is secondary and low (C:L), limited to callers already sharing one knowledge base. No KEV listing, no EPSS score, and no SSVC/automatable signal are present in the input, and no working exploit code is identified - only the vendor advisory and release. The vuln.today Decision label is 'this_month', consistent with a Medium-severity, high-complexity issue rather than act-now. Net: treat as a planned-remediation item, not a fire drill; the AC:H preconditions make reliable weaponization non-trivial, and the most likely real-world manifestation per the vendor is accidental (a legitimate multi-turn caller's context-shaped answer becoming canonical) rather than a deliberate attack. |
| Exploit ScenarioDerived | An unauthenticated attacker sends POST /api/chat (Ollama-compatible path, exempt by default via WHITELIST_PATHS=/api/*) with a target question as the final message and a crafted conversation_history that injects instructions altering the generated answer. Because conversation_history is omitted from the cache key, that attacker-shaped answer is stored as the canonical cached response and later served verbatim - alongside genuine retrieval references, so it looks well-sourced - to authenticated users who later POST /query the same question with no history. No working public exploit code is identified at time of analysis; only the vendor GHSA advisory describing the mechanism exists. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 26, 2026
LightRAG's query-answer cache builds its key from the query text, mode, retrieval/token parameters, user_prompt, enable_rerank and the LLM identity, but omits conversation_history, which is nonetheless forwarded to the model and materially shapes the generated answer. A remote unauthenticated caller using the Ollama-compatible POST /api/chat endpoint (reachable because WHITELIST_PATHS defaults to /health,/api/*) can therefore write the cached answer that authenticated users later receive via POST /query for a colliding key, with no LLM call, system prompt or model-side guardrail applied on the read path; the fabricated text is returned alongside genuine retrieval references, which makes it look well-sourced. Impact is primarily integrity (answers persist without TTL in kv_store_llm_response_cache.json under the default JsonKVStorage and survive restarts) with low confidentiality exposure of another caller's history-derived context; exploitation is constrained by first-writer-wins, the need for an exact key match on every keyed parameter, and the need for the model to actually follow the injected instruction, and no public exploit code has been identified at time of analysis. Fixed in 1.5.5.
RemediationAI
Upgrade to lightrag-hku 1.5.5, which the vendor describes as the complete fix: when conversation_history is non-empty the query-answer cache is bypassed for both read and write, while single-turn queries keep sharing the cache as intended (advisory: https://github.com/HKUDS/LightRAG/security/advisories/GHSA-597m-w632-p8qv, release: https://github.com/HKUDS/LightRAG/releases/tag/v1.5.5). If upgrading immediately is not possible, any one of three vendor-documented workarounds removes the exposure: set WHITELIST_PATHS=/health to require authentication on the Ollama-compatible /api/* routes, which eliminates the unauthenticated write path at the cost of losing open Ollama access and being the recommended option unless that access is needed; set ENABLE_LLM_CACHE=false to disable the query cache entirely, trading away the intended shared-cache performance benefit; or stop sending conversation_history from your clients, which avoids the condition the fix keys on but depends on controlling every integration. In all cases, after upgrading or applying a workaround, clear any entries that may already have been poisoned with POST /documents/clear_cache, since the cached answer has no TTL and persists across restarts until explicitly removed.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The flaw is CWE-349 (Acceptance of Extraneous Untrusted Data With Trusted Data) in LightRAG's shared retrieval-augmented generation cache. compute_args_hash constructs the cache key from the query text, query mode, retrieval and token parameters, user_prompt, enable_rerank and the LLM identity, while conversation_history is passed to the model as history_messages= and is never hashed. Because the cache is intentionally shared across callers - different users asking the same question are meant to get the same answer - and because /api/chat treats every message except the last as conversation history while both /api/chat and /query resolve to the same default mode (mix) and TOP_K, the write key and the victim's read key collide by construction. Only the query-answer cache is affected: the keyword-extraction cache derives keywords from query text alone, the entity-extraction and summary caches are ingestion-side, bypass mode does not use the query-answer cache, and streaming responses are never cached. The patch bypasses the query-answer cache for both read and write whenever conversation_history is non-empty; history was deliberately not added to the key because each turn carries different history and keying on it would convert the deliberately shared cache into a per-session one. Remaining preconditions bound the risk: the entry must not already exist (cache is read before write, so a hit never reaches the model and never writes), the attacker must reproduce every keyed parameter exactly, and the answer is only attacker-controlled to the extent the model obeys the injected history. The bundled WebUI pins history_turns to 0 and is not exposed; external integrations that send history, notably Ollama-compatible clients on /api/chat, are the affected surface.
Know when Lightrag gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:N
Network write path is unauthenticated (PR:N) but AC:H because first-writer-wins, exact key match, and successful prompt injection must all hold; durable answer poisoning gives I:H and leaked shared-history context gives C:L.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
1DescriptionCVE.org
LightRAG provides simple and fast retrieval-augmented generation. Prior to 1.5.5, query responses are cached under a key that omits conversation_history, so an unauthenticated attacker can poison the cached answers returned to other users who send the same query. This issue is fixed in version 1.5.5.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
Authentication bypass in HKUDS LightRAG before 1.5.4 lets a remote unauthenticated attacker defeat X-API-Key protection
Cross-origin data theft in LightRAG server versions prior to 1.5.4 allows any malicious website to make authenticated, c
Server-side request forgery (CWE-918) in LightRAG before 1.5.5 lets an authenticated caller who can upload a Markdown or
Password recovery via a timing oracle in LightRAG's /login endpoint lets remote, unauthenticated attackers (CVSS PR:N/UI
Unthrottled password guessing against the LightRAG POST /login endpoint allows an unauthenticated remote attacker to sub
Stored cross-site scripting (CWE-79) in the LightRAG WebUI prior to 1.5.5 lets an attacker who can ingest a document per
LightRAG API server versions prior to 1.5.5 return raw Python exception text to network clients through error handlers i
EUVD-2026-135957
NVD
CVE.org
EPSS
GitHub
VulDB
Exploit-DB