# CVE-2026-61740: LightRAG is Vulnerable to Authentication Bypass: hardcoded DEFAULT_TOKEN_SECRET and public /auth-status defeat LIGHTRAG_API_KEY protection

> Remote attackers can bypass API key authentication in LightRAG to read, modify, or delete documents and query data when specific configuration conditions are met.

- **Severity:** Critical 9.3 (`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`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 15 Jul 2026
- **Updated:** 15 Jul 2026
- **Also known as:** GHSA-f4vv-55c2-5789, PYSEC-2026-3475

## What is CVE-2026-61740?

CVE-2026-61740 is a critical authentication bypass vulnerability in HKUDS LightRAG, published on 15 Jul 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official 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.

Weakness: CWE-798 (Use of Hard-coded Credentials), CWE-287 (Improper Authentication)

## Which versions are affected by CVE-2026-61740?

3 open source packages ship an affected version, including lightrag-hku.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `lightrag-hku` | PyPI | All versions | 1.5.4 |
| `lightrag-hku` | PyPI | All versions | 1.5.4 |
| `lightrag-hku` | PyPI | All versions | 1.5.4 |

## How do I fix CVE-2026-61740?

Upgrade lightrag-hku to 1.5.4 or later.

## Is CVE-2026-61740 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-61740 exists.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-61740 and fix it if it is affected.

What it is: CVE-2026-61740 is a critical authentication bypass vulnerability in HKUDS LightRAG, published on 15 Jul 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-61740 exists.

Affected packages and fixed versions:
- lightrag-hku (PyPI): affected all versions; fixed in 1.5.4
- lightrag-hku (PyPI): affected all versions; fixed in 1.5.4
- lightrag-hku (PyPI): affected all versions; fixed in 1.5.4

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-61740/ (Markdown: https://insights.sbomify.com/CVE-2026-61740/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-61740
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-61740
- OSV: https://osv.dev/vulnerability/CVE-2026-61740

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-61740/
Summaries are generated and may contain mistakes; the official description above is the record.
