lightrag-hku is vulnerable to Authentication Bypass
98
Critical Risk
The API authentication whitelist matcher in lightrag/api/utils_api.py compares the shipped default WHITELIST_PATHS=/health,/api/* against the full request path including the mount prefix. When LIGHTRAG_API_PREFIX is set to any value beginning with /api (such as the documented /api/v1), every route path starts with /api, so the /api prefix entry matches every request and the whitelist check returns before any credential is examined. Unauthenticated callers can then reach the entire document, query, and graph API, including the destructive DELETE /documents handler, even when both AUTH_ACCOUNTS and LIGHTRAG_API_KEY are configured. The fix resolves the route path with get_route_path, strips the mount prefix before matching, and makes prefix matching segment-aware.
You are affected if you are using a version that falls within the vulnerable range and you set LIGHTRAG_API_PREFIX to a value beginning with /api while relying on the default WHITELIST_PATHS.
lightrag-hku is vulnerable to Authentication Bypass in versions 1.5.0 - 1.5.4.
Upgrade the lightrag-hku library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant