{"id":2397,"cve":"CVE-2026-85709","cve_url":"https:\/\/www.cvedetails.com\/cve\/CVE-2026-85709\/","cwe":"CWE-209","cwe_number":209,"cwe_url":"https:\/\/cwe.mitre.org\/data\/definitions\/209","cvss_score":5.3,"published":"2026-09-22","owasp":"A05 Security Misconfiguration","odc":"Interface","cdc":"Incorrect Interface","category":"Information Leakage","subcategory":"Information Disclosure","scope":"Remote","impact":"Information Disclosure","summary":"Info leakage via raw exception messages exposing paths, DB creds, and config.","permalink":"https:\/\/netpack.pt\/vaitp\/vulnerability\/CVE-2026-85709\/","description":"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.","solution":"Upgrade LightRAG to version\u202f1.5.5 or later to fix the vulnerability.","affected_component":"LightRAG","fixed_by_upgrading":true,"vulnerable_code":"from fastapi import FastAPI, HTTPException, Request\nfrom fastapi.responses import JSONResponse\n\napp = FastAPI()\n\n@app.exception_handler(Exception)\nasync def global_exception_handler(request: Request, exc: Exception):\n    # VULNERABLE: leaks raw exception details including filesystem paths\n    return JSONResponse(\n        status_code=500,\n        content={\"detail\": str(exc)},\n    )\n\n@app.get(\"\/items\/{item_id}\")\nasync def read_item(item_id: int):\n    # Simulate a database error that would expose credentials in the exception text\n    raise RuntimeError(f\"Failed to connect to db:\/\/user:pass@localhost:5432\/dbname\")\n","patched_code":"from fastapi import FastAPI, HTTPException, Request\nfrom fastapi.responses import JSONResponse\n\napp = FastAPI()\n\n@app.exception_handler(Exception)\nasync def global_exception_handler(request: Request, exc: Exception):\n    # FIX: removes raw exception details, returns generic message\n    return JSONResponse(\n        status_code=500,\n        content={\"detail\": \"Internal server error\"},\n    )\n\n@app.get(\"\/items\/{item_id}\")\nasync def read_item(item_id: int):\n    # Simulate a database error; details are no longer leaked to the client\n    raise RuntimeError(f\"Failed to connect to db:\/\/user:pass@localhost:5432\/dbname\")\n","payload_needed":false,"payload":null,"payload_status":"none","published_fix":[{"repository":"HKUDS\/LightRAG","commit_url":"https:\/\/github.com\/HKUDS\/LightRAG\/commit\/4d90a0eb35d40b45f3a9045e308ec126897a3364","commit_subject":"fix(api): sanitize two HTTP 422 detail=str(exc) chunking-validation sites","units":[{"file":"lightrag\/api\/routers\/document_routes.py","function":"create_document_routes"}]},{"repository":"HKUDS\/LightRAG","commit_url":"https:\/\/github.com\/HKUDS\/LightRAG\/commit\/dcab315d7dc1eea682e9b2c4fcb1b06474484c47","commit_subject":"fix(api): stop leaking raw exception text in HTTP 500 responses","units":[{"file":"lightrag\/api\/lightrag_server.py","function":null},{"file":"lightrag\/api\/lightrag_server.py","function":"create_app"},{"file":"lightrag\/api\/routers\/document_routes.py","function":null},{"file":"lightrag\/api\/routers\/document_routes.py","function":"create_document_routes"},{"file":"lightrag\/api\/routers\/graph_routes.py","function":null},{"file":"lightrag\/api\/routers\/graph_routes.py","function":"create_graph_routes"},{"file":"lightrag\/api\/routers\/ollama_api.py","function":null},{"file":"lightrag\/api\/routers\/ollama_api.py","function":"OllamaAPI.setup_routes"},{"file":"lightrag\/api\/routers\/query_routes.py","function":null},{"file":"lightrag\/api\/routers\/query_routes.py","function":"create_query_routes"},{"file":"lightrag\/api\/utils_api.py","function":null}]}],"references":null}