Junglewise Threat Intelligence

CVE-2026-85709: LightRAG API sensitive information exposure in error responses

CVE-2026-85709 · Severity: medium · CVSS 5.3 · Published 2026-09-22

Executive brief

LightRAG is an open-source API server for building retrieval-augmented generation (RAG) systems. The API returns raw Python exception messages directly to clients in HTTP error responses, exposing internal infrastructure details such as server filesystem paths, database credentials and connection details, and system configuration. By default, the API requires no authentication, allowing any network-reachable client to trigger these errors and extract sensitive information without credentials.

Technical details

The vulnerability is an information disclosure flaw (CWE-209 / CWE-215) in which exception handlers across 30+ API routes directly pass raw exception strings to HTTP error responses via `detail=str(e)` patterns instead of returning generic error messages. The root cause is insufficient input validation and exception sanitization in error handling logic. An unauthenticated network client can trigger exceptions (e.g., by requesting endpoints when storage backends are unavailable or misconfigured) to extract filesystem paths, database host/port/user/database names, LLM provider details, and Python stack traces. For URI-configured backends such as MongoDB, malformed configuration errors can expose the full connection string including embedded credentials. The fix involves replacing all raw exception passthrough with generic error messages, logging full exception details server-side, and implementing a global exception handler as defense-in-depth.

Affected products

  • HKUDS LightRAG main branch prior to commit 3422

Timeline

  • 2026-09-22: disclosed
  • 2026-09-22: patched: fix implemented in HKUDS/LightRAG#3422

Related threats