CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-85709

CVE-2026-85709: Sensitive Information Exposure in LightRAG API Server

Amit Schendel
Amit Schendel
Senior Security Researcher

Sep 23, 2026·6 min read·21 visits

Executive Summary (TL;DR)

Improper error handling in LightRAG's FastAPI server prior to version 1.5.5 permits unauthenticated network clients to leak highly sensitive infrastructure details, including absolute filesystem paths and database host parameters, by triggering raw exception traces.

CVE-2026-85709 is a sensitive information exposure vulnerability in HKUDS LightRAG prior to version 1.5.5. The vulnerability allows remote, unauthenticated clients to trigger server-side errors and receive raw Python exception details, including local filesystem paths, database connection strings, credentials, and internal system configurations.

Vulnerability Overview

LightRAG is an open-source retrieval-augmented generation framework designed to integrate knowledge graphs and large language models for advanced information retrieval tasks. The framework exposes a FastAPI-based server component to facilitate document ingestion, graph generation, querying, and backend model configuration. By default, this API server operates without an active authentication mechanism, permitting any network client to interact with the endpoints.

Prior to version 1.5.5, the application suffered from systemic improper exception handling across its core API routes. Under normal operations, failures in network connectivity, malformed inputs, or missing files would trigger backend Python exceptions. Instead of sanitizing these failures, the API routers returned the raw exceptions directly to the clients. This architecture creates a substantial information exposure surface.

The vulnerability is tracked as CVE-2026-85709 and GHSA-hrmj-7rvj-4hg8, matching the CWE-209 classification (Generation of Error Message Containing Sensitive Information). The absolute exposure of traceback structures and connection variables lowers the technical barrier for attackers mapping the host environment, targeting database servers, or constructing secondary exploitation chains.

Root Cause Analysis

The root cause of CVE-2026-85709 is the widespread implementation of generic catch-all try-except structures that directly reflect system error states to HTTP responses. Specifically, across approximately 31 endpoints in modules such as document_routes.py, graph_routes.py, and query_routes.py, the developers utilized a standardized error handling pattern. This pattern caught all exceptions using except Exception as e and threw a FastAPI HTTPException with detail=str(e).

When Python serializes exceptions to string formats, the resulting string typically includes context-specific details. In the context of database drivers (such as PostgreSQL's asyncpg, MongoDB's pymongo, or Neo4j drivers), an exception caused by a failed connection, timeout, or authentication failure frequently contains sensitive configuration parameters. This metadata can include backend hostname values, internal port numbers, username strings, and database schemas.

Because the endpoints do not perform pre-execution validation or sanitize outbound error details, any backend failure exposes the internal running context. The lack of standard exception translation layers allowed operational driver failures to bypass administrative visibility and propagate raw diagnostic records directly to untrusted web clients.

Code Analysis and Patch Review

The vulnerability was distributed across multiple router files. The following example demonstrates the pre-patch vulnerability structure within the document uploading route:

# Pre-patch vulnerable pattern in lightrag/api/routers/document_routes.py
@router.post("/documents/upload")
async def upload_document(file: UploadFile = File(...)):
    try:
        # Ingestion logic executed here
        await process_document_ingestion(file)
    except Exception as e:
        logger.error(f"Error /documents/upload: {file.filename}: {str(e)}")
        logger.error(traceback.format_exc())
        # VULNERABLE: Stringified exception 'str(e)' is returned to client
        raise HTTPException(status_code=500, detail=str(e))

In version 1.5.5, the maintainers implemented a two-tier remediation strategy. The primary defense introduces a centralized sanitization helper function within lightrag/api/utils_api.py. This helper captures the exception, logs the details securely on the server, generates a randomized 12-character hexadecimal correlation ID, and returns a generic client-safe HTTP response.

# Defensive mitigation helper in lightrag/api/utils_api.py
import uuid
from fastapi import HTTPException
 
_INTERNAL_SERVER_ERROR_MESSAGE = "Internal server error"
 
def internal_server_error(exc: Exception) -> HTTPException:
    # Generate a unique correlation ID for server-side log auditing
    error_id = uuid.uuid4().hex[:12]
    logger.error(
        f"Returning HTTP 500 to client [error_id={error_id}] ({type(exc).__name__})"
    )
    # Return generic error details and ID, completely hiding the exception string
    return HTTPException(
        status_code=500,
        detail=f"{_INTERNAL_SERVER_ERROR_MESSAGE} (error_id: {error_id})",
    )

All endpoint modules were refactored to replace raise HTTPException(status_code=500, detail=str(e)) with raise internal_server_error(e). To ensure complete defensive coverage, a last-resort global exception handler was registered within lightrag_server.py. This handler intercepts any uncaught runtime exceptions that escape standard router handlers, preventing the underlying ASGI server from disclosing unhandled stack trace frames.

Exploitation Methodology and Vector Analysis

Exploitation of CVE-2026-85709 is straightforward because it does not require authentication or complex state preparation. The attacker's objective is to systematically induce server-side exceptions and parse the reflected response structures.

Common exploitation vectors include:

  1. Sending malformed JSON structures to endpoints with rigid schema validators.
  2. Uploading corrupted document formats to /documents/upload to trigger file-parsing or driver-level insertion failures.
  3. Initiating high volumes of concurrent requests to exhaust backend database connections, triggering connection pool exhaustion tracebacks.

When a connection or operational error is successfully induced, the unpatched server returns an HTTP 500 response containing detailed traceback metadata. From this metadata, the attacker can extract local path definitions (e.g., /opt/lightrag/workspace/config.json), active database parameters, and internal Python library versions. These details are used to perform targeted external host profiling.

Impact Assessment

The overall severity of CVE-2026-85709 is classified as Medium, represented by a CVSS v3.1 score of 5.3 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N). The impact vector is limited to confidentiality. The vulnerability does not directly allow write access, system manipulation, or service disruption, which leaves the integrity and availability scores at none.

Despite the lack of direct control-flow hijacking, the exposure of internal execution parameters is a significant security risk. Retrieval-augmented generation platforms handle sensitive corporate data and interface directly with key internal datastores. Disclosing absolute directory paths and internal database credentials significantly assists attackers in targeting localized path traversal vulnerabilities or seeking lateral movement opportunities.

Furthermore, the disclosure of internal network topologies, system usernames, and configuration layouts provides the exact parameters required for offline credential brute-forcing and network scanning. This risk is amplified if the database driver prints raw authorization tokens or unredacted connection strings.

Remediation and Defensive Guidance

The primary remediation strategy is upgrading the LightRAG package to version 1.5.5 or later. This release enforces the sanitized generic exception structures globally and establishes the internal_server_error translation framework across all API modules.

For systems where immediate upgrades are not possible, administrators should apply the following secondary workarounds:

  1. Restrict access to the API port (default 9621) using host-based firewalls, network security groups, or a reverse proxy. Limit API communication strictly to authorized internal hosts.
  2. Enforce the LIGHTRAG_API_KEY environment variable configuration to block unauthenticated access across the entire API router structure.
  3. Configure web application firewall (WAF) rule sets to detect and block outgoing HTTP responses containing standard Python tracebacks, exception identifiers, and server configuration structures.

Fix Analysis (2)

Technical Appendix

CVSS Score
5.3/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

Affected Systems

HKUDS LightRAG

Affected Versions Detail

Product
Affected Versions
Fixed Version
LightRAG
HKUDS
< 1.5.51.5.5
AttributeDetail
CWE IDCWE-209
Attack VectorNetwork (AV:N)
CVSS v3.1 Score5.3 (Medium)
Exploit StatusNo Public Exploits
ImpactPartial Confidentiality Leak
CISA KEV StatusNot Listed

MITRE ATT&CK Mapping

T1005Data from Local System
Collection
CWE-209
Generation of Error Message Containing Sensitive Information

The product generates an error message that includes sensitive information about its environment, users, or associated data.

Vulnerability Timeline

Defensive patches written to resolve sensitive information leakage
2026-07-18
Vulnerability cataloged by GitHub Security Advisories and NVD
2026-09-22
Release of LightRAG version 1.5.5 containing the patch
2026-09-22

References & Sources

  • [1]GitHub Security Advisory GHSA-hrmj-7rvj-4hg8
  • [2]LightRAG Pull Request #3422
  • [3]LightRAG Release v1.5.5
  • [4]Fix Commit: Centralized Sanitization Helper
  • [5]Fix Commit: Chunking 422 Sanitization
  • [6]NVD CVE-2026-85709 Detail

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•5 minutes ago•CVE-2026-62361
5.5

CVE-2026-62361: Authenticated SQL Injection and Table Access Control Bypass in Listmonk Subscriber Export

CVE-2026-62361 (GHSA-xgjr-7j9q-2h4r) is an authenticated SQL injection and authorization bypass vulnerability in listmonk, an open-source, self-hosted newsletter and mailing list manager written in Go. In versions prior to 6.2.0, the subscriber export endpoint (GET /api/subscribers/export) directly interpolates user-supplied SQL filter expressions into a PostgreSQL query without invoking the table allowlist validation function (validateQueryTables). Consequently, authenticated users possessing the subscribers:sql_query and subscribers:get_all permissions can bypass relational access controls, execute arbitrary subqueries against restricted tables such as users and settings, and modify database state via writable Common Table Expressions (CTEs).

Alon Barad
Alon Barad
0 views•11 min read
•about 1 hour ago•CVE-2026-28385
5.0

CVE-2026-28385: Server-Side Request Forgery in Canonical LXD Image Import

CVE-2026-28385 (GHSA-3gq2-x4qg-p4g6) is a Server-Side Request Forgery (SSRF) vulnerability in Canonical LXD versions 4.12 through 6.9. An authenticated user possessing the can_create_images entitlement can force the LXD daemon to execute arbitrary outbound HTTP and HTTPS requests via the /1.0/images API endpoint. Due to the absence of egress destination validation, an attacker can probe host loopback services, RFC 1918 private network segments, and cloud Instance Metadata Services (IMDS) from the network position of the privileged LXD daemon.

Amit Schendel
Amit Schendel
4 views•9 min read
•about 2 hours ago•GHSA-9J25-MM2H-2F76
9.9

CVE-2026-48750: Arbitrary File Write on Host via exec-output Symlink in Canonical LXD and Incus

Canonical LXD and LXC Incus contain an arbitrary file write vulnerability (CWE-73 / CWE-59) in the `/1.0/instances/<name>/exec` REST API endpoint. When an instance is unpacked from an image archive, top-level symbolic links are extracted directly onto the host filesystem within the instance storage directory. If a crafted image includes a symbolic link named `exec-output` pointing to an arbitrary host path, invoking the execution endpoint with `record-output: true` causes the privileged host daemon to follow the symlink and write command output files directly to the target host directory. An authenticated attacker with permissions to import images and execute commands can exploit this flaw to write controlled content to sensitive host directories such as `/etc/cron.d`, resulting in arbitrary code execution on the host as `root`.

Alon Barad
Alon Barad
5 views•12 min read
•about 3 hours ago•GHSA-VGHH-5RFX-XHQ8
9.9

CVE-2026-48749: Arbitrary Host File Read and Write via Malicious Image Symlink in Canonical LXD and Incus

CVE-2026-48749 (tracked as GHSA-vghh-5rfx-xhq8 for LXD and GHSA-2q3f-q5pq-g8wv for Incus) is a critical container escape vulnerability in the Canonical LXD and Linux Containers Incus system container managers. By importing a specially crafted container image archive containing duplicate tar member headers, an authenticated attacker can replace the instance rootfs directory with a symbolic link pointing to the underlying host root filesystem. When performing file operations on a stopped container, the privileged forkfile helper binary resolves the symbolic link without confinement and chroots directly into the host filesystem, granting arbitrary root-level file read and write access.

Amit Schendel
Amit Schendel
4 views•9 min read
•about 4 hours ago•GHSA-FMC8-P6Q7-75CC
9.9

GHSA-fmc8-p6q7-75cc: Argument Injection in Canonical LXD Backup Compression Leads to Host Root Code Execution

GHSA-fmc8-p6q7-75cc (associated with CVE-2026-48755) is a critical argument injection vulnerability in Canonical LXD (github.com/canonical/lxd). The vulnerability occurs during instance and storage volume backup operations when processing the user-supplied compression_algorithm configuration parameter. While LXD validates the primary executable token against an allowlist of supported compression binaries, it fails to sanitize or restrict subsequent tokens parsed via shellquote.Split. These additional arguments are passed directly to exec.Command. An authenticated attacker with privileges to trigger backups can inject command-line flags for utilities like zstd to read staged files from a container filesystem and write them to arbitrary paths on the underlying host filesystem, such as /etc/cron.d/, achieving root-level arbitrary code execution on the host.

Amit Schendel
Amit Schendel
6 views•10 min read
•about 5 hours ago•GHSA-PJFF-C2WC-F6JM
9.9

CVE-2026-48769: Arbitrary File Write and Remote Code Execution via Trusted Image Hash in Canonical LXD and Linux Containers Incus

A critical path traversal vulnerability caused by improper input validation (CWE-20) exists in the direct image download handler of Canonical LXD and Linux Containers Incus. When an authenticated user requests an image import using the URL source type, the daemon reads the image fingerprint from an untrusted HTTP response header (`Incus-Image-Hash` or `LXD-Image-Hash`) without validating that it conforms to a SHA-256 format. This unvalidated string is concatenated directly into a filesystem path via `filepath.Join` prior to file creation and cryptographic verification, allowing directory traversal sequences to write arbitrary files on the host filesystem as root.

Alon Barad
Alon Barad
8 views•10 min read