Intel

AIKIDO-2026-983507

lightrag-hku is vulnerable to Denial of Service (DoS)

Denial of Service (DoS)GHSA-3wg5-5w54-3rfm Published 4 days ago

75

High Risk

This Affects:

PYTHONlightrag-hku
1.4.9.11 - 1.5.4
Fixed in 1.5.5
Are you affected? Scan for Free

TL;DR

The token auto-renewal path in lightrag/api/utils_api.py writes to a process-wide _token_renewal_cache dictionary keyed on the JWT sub claim before any authorization decision, with no size cap or eviction. In the API-key-only profile the JWT secret falls back to a public constant, so a client can mint signature-valid tokens with an arbitrary large sub, and every request that is ultimately rejected still permanently grows the dictionary. The same unsanitized sub is written into an INFO log line, allowing CR/LF log record forgery. The fix bounds the cache with an eviction ceiling, moves the write after the authorization decision, and sanitizes the logged value.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you run the server in the API-key-only profile (LIGHTRAG_API_KEY set, AUTH_ACCOUNTS unset) with token auto-renewal enabled.

Background info

lightrag-hku is vulnerable to Denial of Service (DoS) in versions 1.4.9.11 - 1.5.4.

How to fix this

Upgrade the lightrag-hku library to the patch version.