Description
LightRAG provides simple and fast retrieval-augmented generation. Prior to 1.5.4, when LightRAG is deployed with LIGHTRAG_API_KEY set but AUTH_ACCOUNTS unset, X-API-Key protection can be bypassed because lightrag/api/auth.py falls back to a hardcoded DEFAULT_TOKEN_SECRET, /auth-status and /login can mint guest JWTs, and combined_dependency in lightrag/api/utils_api.py accepts a valid guest token before checking the API key. A remote unauthenticated attacker can call endpoints guarded by combined_auth, including document read, upload, deletion, graph mutation, and query endpoints. This vulnerability is fixed in 1.5.4.
Published: 2026-07-15
Score: 9.3 Critical
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

LightRAG, a retrieval‑augmented generation framework, contained an authentication bypass that allowed a remote attacker to access protected services without credentials. By default, the system falls back to a hardcoded secret when LIGHTRAG_API_KEY is set but AUTH_ACCOUNTS is unset, enabling guest JSON Web Tokens to be minted from public /auth‑status and /login endpoints. The combined_dependency function accepts these guest tokens before checking the API key, giving an unauthenticated user the ability to call any endpoint protected by combined_auth, including document read, upload, deletion, graph mutation, and query operations. This bug represents a classic authentication bypass (CWE‑287) coupled with an exposed hard‑coded credential (CWE‑798).

Affected Systems

Vendors: HKUDS; Product: LightRAG. Systems running any version of LightRAG prior to 1.5.4 where the environment variable LIGHTRAG_API_KEY is configured but AUTH_ACCOUNTS is not set are vulnerable. Deployments of LightRAG 1.5.4 or newer have the fix applied.

Risk and Exploitability

The vulnerability scores a CVSS of 9.3, indicating a severe impact if exploited. The EPSS score is less than 1%, suggesting that exploitation is currently unlikely, and the vulnerability is not listed in CISA’s KEV catalogue. An attacker can exploit the issue remotely over HTTP from any network that can reach the service, without requiring authentication. The high base score and widespread endpoint exposure mean that, if the flaw were actively exploited, an attacker could read, modify, or delete data stored in the system. Given the low EPSS, the immediate risk is moderate, but the severity of potential impact warrants timely mitigation.

Generated by OpenCVE AI on July 31, 2026 at 03:40 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade LightRAG to version 1.5.4 or later.
  • Ensure that AUTH_ACCOUNTS is configured or remove the LIGHTRAG_API_KEY environment variable if the API key is not needed.
  • Restrict access to the /auth‑status and /login endpoints to authorized networks or internal interfaces, or apply additional network segmentation or firewall rules.

Generated by OpenCVE AI on July 31, 2026 at 03:40 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-f4vv-55c2-5789 LightRAG is Vulnerable to Authentication Bypass: hardcoded DEFAULT_TOKEN_SECRET and public /auth-status defeat LIGHTRAG_API_KEY protection
History

Wed, 15 Jul 2026 20:30:00 +0000

Type Values Removed Values Added
First Time appeared Hkuds
Hkuds lightrag
Vendors & Products Hkuds
Hkuds lightrag

Wed, 15 Jul 2026 16:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Wed, 15 Jul 2026 15:00:00 +0000

Type Values Removed Values Added
Description LightRAG provides simple and fast retrieval-augmented generation. Prior to 1.5.4, when LightRAG is deployed with LIGHTRAG_API_KEY set but AUTH_ACCOUNTS unset, X-API-Key protection can be bypassed because lightrag/api/auth.py falls back to a hardcoded DEFAULT_TOKEN_SECRET, /auth-status and /login can mint guest JWTs, and combined_dependency in lightrag/api/utils_api.py accepts a valid guest token before checking the API key. A remote unauthenticated attacker can call endpoints guarded by combined_auth, including document read, upload, deletion, graph mutation, and query endpoints. This vulnerability is fixed in 1.5.4.
Title LightRAG: Authentication bypass: hardcoded DEFAULT_TOKEN_SECRET and public /auth-status defeat LIGHTRAG_API_KEY protection
Weaknesses CWE-287
CWE-798
References
Metrics cvssV4_0

{'score': 9.3, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-07-15T15:30:39.185Z

Reserved: 2026-07-10T18:59:00.047Z

Link: CVE-2026-61740

cve-icon Vulnrichment

Updated: 2026-07-15T15:30:32.904Z

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-07-31T03:45:04Z

Weaknesses
  • CWE-287

    Improper Authentication

  • CWE-798

    Use of Hard-coded Credentials