CVE-2026-85709
Info leakage via raw exception messages exposing paths, DB creds, and config.
- CVSS 5.3
- CWE-209
- Information Leakage
- Remote
LightRAG provides simple and fast retrieval-augmented generation. Prior to 1.5.5, the LightRAG API server returns raw Python exception text from error handlers in document_routes.py, graph_routes.py, query_routes.py, ollama_api.py, and lightrag_server.py. The detail=str(e), detail=str(exc), and equivalent formatted-message paths expose server filesystem paths, database host, port, user, and database names, language-model provider diagnostics, configuration details, and Python library internals to a network client that can trigger an error. The default unauthenticated configuration makes those responses reachable without credentials, and URI-configured backends can disclose connection strings containing credentials depending on the underlying driver error. This issue is fixed in version 1.5.5.
- CWE
- CWE-209
- CVSS base score
- 5.3
- Published
- 2026-09-22
- OWASP
- A05 Security Misconfiguration
- Orthogonal defect classification
- Interface
- Code defect classification
- Incorrect Interface
- Category
- Information Leakage
- Subcategory
- Information Disclosure
- Accessibility scope
- Remote
- Impact
- Information Disclosure
- Affected component
- LightRAG
- Fixed by upgrading
- Yes
Solution
Upgrade LightRAG to version 1.5.5 or later to fix the vulnerability.
Vulnerable code sample
from fastapi import FastAPI, HTTPException, Request
from fastapi.responses import JSONResponse
app = FastAPI()
@app.exception_handler(Exception)
async def global_exception_handler(request: Request, exc: Exception):
# VULNERABLE: leaks raw exception details including filesystem paths
return JSONResponse(
status_code=500,
content={"detail": str(exc)},
)
@app.get("/items/{item_id}")
async def read_item(item_id: int):
# Simulate a database error that would expose credentials in the exception text
raise RuntimeError(f"Failed to connect to db://user:pass@localhost:5432/dbname")Patched code sample
from fastapi import FastAPI, HTTPException, Request
from fastapi.responses import JSONResponse
app = FastAPI()
@app.exception_handler(Exception)
async def global_exception_handler(request: Request, exc: Exception):
# FIX: removes raw exception details, returns generic message
return JSONResponse(
status_code=500,
content={"detail": "Internal server error"},
)
@app.get("/items/{item_id}")
async def read_item(item_id: int):
# Simulate a database error; details are no longer leaked to the client
raise RuntimeError(f"Failed to connect to db://user:pass@localhost:5432/dbname")Published fix
Public sources link this CVE to the changes below. The code samples above were generated to illustrate the defect; these links lead to the code the project actually changed.
- fix(api): sanitize two HTTP 422 detail=str(exc) chunking-validation sites (HKUDS/LightRAG)
lightrag/api/routers/document_routes.py · create_document_routes - fix(api): stop leaking raw exception text in HTTP 500 responses (HKUDS/LightRAG)
lightrag/api/lightrag_server.py,lightrag/api/lightrag_server.py · create_app,lightrag/api/routers/document_routes.py,lightrag/api/routers/document_routes.py · create_document_routes,lightrag/api/routers/graph_routes.py,lightrag/api/routers/graph_routes.py · create_graph_routes,lightrag/api/routers/ollama_api.py,lightrag/api/routers/ollama_api.py · OllamaAPI.setup_routes,lightrag/api/routers/query_routes.py,lightrag/api/routers/query_routes.py · create_query_routes,lightrag/api/utils_api.py
Cite this entry
@misc{vaitp:cve202685709,
title = {{Info leakage via raw exception messages exposing paths, DB creds, and config.}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2026},
note = {VAITP Python Vulnerability Dataset, entry CVE-2026-85709},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-85709/}}
}
Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.
The supreme art of war is to subdue the enemy without fighting.
Sun Tzu – “The Art of War”
:: Shaping the future through research and ingenuity ::
