lightrag-hku is vulnerable to Regular Expression Denial of Service (ReDoS)
65
CVE Score
Medium
Regular Expression Denial of Service (ReDoS)
The sentence_split_regex field of the chunking parameters accepted by POST /documents/text is a user-supplied regular expression whose validator in lightrag/api/routers/document_routes.py only checks that it compiles, not that it is safe. The pattern is then run with re.split against the user-supplied document body in lightrag/chunker/semantic_vector.py with no complexity limit or timeout. A request carrying a catastrophically backtracking pattern pins a CPU core indefinitely, holding the GIL so the server stops answering requests and does not recover without a restart. The fix removes the user-supplied sentence_split_regex option entirely.
Upgrade the lightrag-hku library to the patch version.
You are affected if you are using a version that falls within the vulnerable range and the POST /documents/text or POST /documents/texts endpoints are reachable by clients who can supply chunking parameters.
0.0.1 - 1.5.4
Fixed in 1.5.5lightrag-hku is vulnerable to Regular Expression Denial of Service (ReDoS) in versions 0.0.1 - 1.5.4.
Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.
No credit card required | Scan results in 32 seconds.
I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.