CVE-2026-61740

LightRAG: Authentication bypass: hardcoded DEFAULT_TOKEN_SECRET and public /auth-status defeat LIGHTRAG_API_KEY protection

Published Jul 15, 2026 CVSS 4.0 · 9.3 Critical EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical 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.

Remediation

No solution or workaround provided in the CVE record.

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
Type Values Removed Values Added
First Time appeared Hkuds
Hkuds lightrag
Vendors & Products Hkuds
Hkuds lightrag
Type Values Removed Values Added
Metrics ssvc

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

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'}

Weaknesses
  • CWE-287

    Improper Authentication

  • CWE-798

    Use of Hard-coded Credentials

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jul 15, 2026, 3:30 PM
Reserved
Jul 10, 2026, 6:59 PM
Status
Deferred
Published
Jul 15, 2026, 3:16 PM
Modified
Oct 24, 2026, 9:10 PM