shemhamforash23/lightrag-mcp
shemhamforash23/lightrag-mcp
0047c881a56flightrag_mcp0.1.1 in pyproject.tomlPaths from tool input into commands, SQL, files and URLs
How much power the tools give an agent over the machine
Hidden instructions and poisoning in text for the model
Known vulnerabilities in the packages the server uses
How the server reads credentials and where they can go
Whether the tools do only what their descriptions say
How far the analysis went
The scanner traces each tool from its input to the operations its code performs, and here it could not follow every path. Code Safety and Capability Exposure are shown as partly traced instead of a score: no finding there is not a clean result.
- In 5 places a tool's input is handed to a function whose name matches several definitions in the code; the scanner could not tell which one runs, so it stopped there
Top risks in plain words
- CRITICAL7 production dependencies have known vulnerabilities (worst: critical).
How to use it safely
Practical steps from what we found in this server. They lower the risk; they do not replace a review of the code.
- Update its vulnerable packages
Use
anyio4.14.2 or later,certifi2026.10.18 or later,h110.16.0 or later,idna3.15 or later and 3 more. - Keep confirmations on
Leave your MCP client's confirmation prompt on for tools that change files, run commands or send data.
What its tools can do on your machine
The server offers 17 tools. When an AI agent calls them, this is what their code can do on the machine where the server runs, as traced in the source. Tools that call code the scanner could not follow may do more.
None of the tools reaches any of these in the code the scanner could trace.
Where its requests and secrets go
Read from the names along each tool's calls, not from a run: what the code says, not every address it may reach at run time.
The literal addresses the tools' requests name.
- None: no request names a fixed host.
Constants or settings that start an address; the value comes from configuration.
- None seen.
Credential-like environment variables. Give the server a key with the least access it needs.
- None: no credential-like variable is read by the tools.
Text it brings in from outside
No tool was seen returning text from outside the server to the model.
Tool annotations
No tool declares MCP annotations (readOnlyHint, destructiveHint and the rest). Clients use them to decide what to confirm; directories such as Anthropic's and OpenAI's ask for them.
Tools, prompts and resources (17: 17 tools)
Open a row for its full description. Chips show what its code can reach, and which risky capability its own description declares.
check_lightrag_healthtool Check LightRAG API status
Check LightRAG API status
create_entitiestool Create multiple entities in knowledge graph
Create multiple entities in knowledge graph
create_relationstool Create multiple relationships between entities in knowledge graph
Create multiple relationships between entities in knowledge graph
delete_by_doc_idstool Delete all entities and relationships associated with multiple documents
Delete all entities and relationships associated with multiple documents
delete_by_entitiestool Delete multiple entities from knowledge graph by name
Delete multiple entities from knowledge graph by name
edit_entitiestool Edit multiple existing entities in knowledge graph
Edit multiple existing entities in knowledge graph
edit_relationstool Edit multiple relationships between entities in knowledge graph
Edit multiple relationships between entities in knowledge graph
get_documentstool Get list of all uploaded documents
Get list of all uploaded documents
get_graph_labelstool Get labels (node and relationship types) from knowledge graph
Get labels (node and relationship types) from knowledge graph
get_pipeline_statustool Get status of document processing in pipeline
Get status of document processing in pipeline
insert_batchtool Add batch of documents from directory to LightRAG
Add batch of documents from directory to LightRAG
insert_documenttool Add text directly to LightRAG storage
Add text directly to LightRAG storage
insert_filetool Add document from file to LightRAG
Add document from file to LightRAG
merge_entitiestool Merge multiple entities into one with relationship migration
Merge multiple entities into one with relationship migration
query_documenttool Execute a query to documents through LightRAG API
Execute a query to documents through LightRAG API
scan_for_new_documentstool Start scanning LightRAG /inputs directory for new documents
Start scanning LightRAG /inputs directory for new documents
upload_documenttool Upload document from file to LightRAG's /inputs directory and start indexing
Upload document from file to LightRAG's /inputs directory and start indexing
Text the model reads (17)
Every tool, prompt and resource description as written in the code: the model sees all of it, the user usually does not.
query_document tool
Execute a query to documents through LightRAG API
insert_document tool
Add text directly to LightRAG storage
upload_document tool
Upload document from file to LightRAG's /inputs directory and start indexing
insert_file tool
Add document from file to LightRAG
insert_batch tool
Add batch of documents from directory to LightRAG
scan_for_new_documents tool
Start scanning LightRAG /inputs directory for new documents
get_documents tool
Get list of all uploaded documents
get_pipeline_status tool
Get status of document processing in pipeline
get_graph_labels tool
Get labels (node and relationship types) from knowledge graph
check_lightrag_health tool
Check LightRAG API status
merge_entities tool
Merge multiple entities into one with relationship migration
create_entities tool
Create multiple entities in knowledge graph
delete_by_entities tool
Delete multiple entities from knowledge graph by name
delete_by_doc_ids tool
Delete all entities and relationships associated with multiple documents
edit_entities tool
Edit multiple existing entities in knowledge graph
create_relations tool
Create multiple relationships between entities in knowledge graph
edit_relations tool
Edit multiple relationships between entities in knowledge graph
What we checked
The same checks run on every server. Each line below has one of these marks:
- 8 checks: command injection, argument injection, path traversal, server-side request forgery, SQL injection, code execution, unsafe deserialization, template injectionChecked on every scan. Results in this category are published only after a person has verified them.
- Runs programs the caller choosesNo tool runs a command or program the caller supplies — 17 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Executes caller-supplied codeNo tool evaluates code the caller supplies — 17 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Reads or writes any file pathNo tool works on a file path the caller supplies without a root check — 17 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Requests any addressNo tool sends a request to an address the caller supplies — 17 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Runs caller-supplied SQLNo tool executes a query the caller supplies — 17 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Tools that start processesNot seen in the traced code of 17 capabilities; 17 more call code the scanner could not follow, where it may happen
- Tools that touch filesNot seen in the traced code of 17 capabilities; 17 more call code the scanner could not follow, where it may happen
- Tools that call the networkNot seen in the traced code of 17 capabilities; 17 more call code the scanner could not follow, where it may happen
Where the code is: 17 handlers in 1 file at commit 0047c881a56f
- 5 checks: tool poisoning, instruction override, hidden content, exfiltration requests, metadata integrityChecked on every scan. Results in this category are published only after a person has verified them.
- Dependency manifests1 manifest: pyproject.toml
- Lockfiles checked against OSV1 file resolved and checked against the OSV database; 1 not resolved: pyproject.toml: dependency ranges declared here were not resolved against a lockfile and were not checked
- Known vulnerabilities in production dependencies CRITICAL7 production packages with known advisories
- Known vulnerabilities in other dependenciesNo package used only for development, tests or examples has a known advisory
- MCP SDK versionmcp >=1.6.0
- 3 checks: credential harvesting, undeclared credential access, credentials sent over the networkChecked on every scan. Results in this category are published only after a person has verified them.
- Tools that read credentialsNot seen in the traced code of 17 capabilities; 17 more call code the scanner could not follow, where it may happen
- Authentication declaredNot checked: needs the live server's tools/list (a remote server declares how clients authenticate)
- 3 checks: undeclared network access, undeclared file access, undeclared process executionChecked on every scan. Results in this category are published only after a person has verified them.
- Tool descriptions presentEvery tool has a description the model and the user can read
- Statically known namesEvery tool's name could be read from the code
- Input schemasNot checked: needs the live server's tools/list (every tool declares an input schema)
- Destructive tools annotatedNot checked: needs the live server's tools/list (tools that write, delete or run commands carry destructivehint)
Dependencies with known vulnerabilities (7 in production)
Dependency ranges were not resolved against a lockfile, so the score is capped at 7.
anyioPyPI 4.9.0 CRITICAL 4 advisories 4.14.2
- CRITICALGHSA-82r6-8w77-94w6 CVE-2026-63374 PYSEC-2026-4025AnyIO: TLSStream IDNA 2003 host name encoding enables potential TLS certificate spoofing
- MEDIUMPYSEC-2026-4024 CVE-2026-64847 GHSA-5p39-cfhj-2xmpAnyIO process-pool workers can block indefinitely on undrained stderr
- MEDIUMGHSA-5p39-cfhj-2xmp CVE-2026-64847 PYSEC-2026-4024AnyIO process-pool workers can block indefinitely on undrained stderr
- MEDIUMPYSEC-2026-4025 CVE-2026-63374 GHSA-82r6-8w77-94w6AnyIO: TLSStream IDNA 2003 host name encoding enables potential TLS certificate spoofing
certifiPyPI 2025.1.31 CRITICAL 2 advisories 2026.10.18
- CRITICALGHSA-6q48-6c7w-9gw2 PYSEC-2026-4320certifi bundles emSign root CAs with compromised intermediate CA keys
- MEDIUMPYSEC-2026-4320 GHSA-6q48-6c7w-9gw2certifi bundles emSign root CAs with compromised intermediate CA keys
h11PyPI 0.14.0 CRITICAL 2 advisories 0.16.0
- CRITICALGHSA-vqfr-h8mv-ghfj CVE-2025-43859 PYSEC-2026-348h11 accepts some malformed Chunked-Encoding bodies
- MEDIUMPYSEC-2026-348 CVE-2025-43859 GHSA-vqfr-h8mv-ghfjh11 accepts some malformed Chunked-Encoding bodies
starlettePyPI 0.46.1 HIGH 14 advisories 0.47.20.49.11.0.1+3 more
- HIGHGHSA-82w8-qh3p-5jfq CVE-2026-54283 PYSEC-2026-249Starlette: request.form() limits silently ignored for application/x-www-form-urlencoded enable DoS
- HIGHGHSA-7f5h-v6xp-fcq8 CVE-2025-62727 PYSEC-2026-1942Starlette vulnerable to O(n^2) DoS via Range header merging in ``starlette.responses.FileResponse``
- HIGHGHSA-wqp7-x3pw-xc5r CVE-2026-48818 PYSEC-2026-2281Starlette: SSRF and NTLM credential theft via UNC paths in StaticFiles on Windows
- MEDIUMPYSEC-2026-2280 CVE-2026-48817 GHSA-x746-7m8f-x49cStarlette is a lightweight ASGI framework/toolkit. In versions 1.0.1 and below, when dispatching a request, HTTPEndpoint selects the handler by lowercasing the HTTP method and looking it up as an attribute with getattr, without restricting the lookup to a known set of HTTP verbs. When an HTTPEndpoint subclass is registered through Route(...) without an explicit methods= argument, the route does not constrain the method and every method reaches the endpoint. If a non-standard HTTP method whose lowercased name matches an attribute on the endpoint subclass reaches the endpoint, that attribute is invoked as if it were a request handler. An attacker can use this to reach methods that were never meant to be HTTP handlers, such as internal helpers, without the authorization checks applied by the intended public handler. An application (including Starlette-based frameworks like FastAPI) is affected if it registers an HTTPEndpoint subclass via Route(...) without explicitly setting methods=, and that subclass includes extra methods named like non-standard HTTP verbs that take one request argument and return a response. This issue has been fixed in version 1.1.0.
- MEDIUMGHSA-2c2j-9gv5-cj73 CVE-2025-54121 PYSEC-2026-1941Starlette has possible denial-of-service vector when parsing large files in multipart forms
- MEDIUMGHSA-86qp-5c8j-p5mr CVE-2026-48710 PYSEC-2026-161 X41-2026-002Starlette has missing Host header validation that poisons request.url.path, bypassing path-based security checks
- MEDIUMPYSEC-2026-2281 CVE-2026-48818 GHSA-wqp7-x3pw-xc5rStarlette is a lightweight ASGI framework/toolkit. In versions 1.0.1 and earlier, StaticFiles on Windows is vulnerable to SSRF. An UNC path such as \\\\attacker.com\\share can cause os.path.realpath to initiate an outbound SMB connection before the path is rejected, exposing the service account’s NTLMv2 credentials for offline cracking or relay even though the HTTP response is only a 404. The issue affects default follow_symlink=False deployments, including frameworks built on Starlette such as FastAPI; POSIX systems and follow_symlink=True are unaffected. The issue is fixed in 1.1.0.
- MEDIUMGHSA-x746-7m8f-x49c CVE-2026-48817 PYSEC-2026-2280Starlette: Arbitrary HTTP method dispatched to `HTTPEndpoint` attributes via `getattr`
- MEDIUMPYSEC-2026-249 CVE-2026-54283 GHSA-82w8-qh3p-5jfqStarlette is a lightweight ASGI framework/toolkit. From 0.4.1 until 1.3.1, request.form() accepts max_fields and max_part_size to bound resource consumption while parsing form data. These limits are enforced for multipart/form-data, but silently ignored for application/x-www-form-urlencoded. An unauthenticated attacker can therefore send a urlencoded body with an arbitrarily large number of fields or an arbitrarily large field, even when the application configured limits it believed would apply. This vulnerability is fixed in 1.3.1.
- MEDIUMPYSEC-2026-1941 CVE-2025-54121 GHSA-2c2j-9gv5-cj73Starlette has possible denial-of-service vector when parsing large files in multipart forms
- MEDIUMPYSEC-2026-161 CVE-2026-48710 GHSA-86qp-5c8j-p5mr X41-2026-002BadHost: Missing Host header validation poisons request.url.path, bypassing path-based security checks
- MEDIUMPYSEC-2026-248 CVE-2026-54282 GHSA-jp82-jpqv-5vv3Starlette is a lightweight ASGI framework/toolkit. Prior to 1.3.0, the HTTP request path is not validated before being used to reconstruct request.url. Because request.url is rebuilt by concatenating {scheme}://{host}{path} and re-parsing the result, a path that does not begin with / (for example @google.com) moves the authority boundary during re-parsing, so request.url.hostname and request.url.netloc become attacker-controlled. Code that reads request.url.hostname (rather than the Host header or scope) can therefore be misled into trusting an attacker-supplied host. This vulnerability is fixed in 1.3.0.
- MEDIUMPYSEC-2026-1942 CVE-2025-62727 GHSA-7f5h-v6xp-fcq8Starlette vulnerable to O(n^2) DoS via Range header merging in ``starlette.responses.FileResponse``
- LOWGHSA-jp82-jpqv-5vv3 CVE-2026-54282 PYSEC-2026-248Starlette: Unvalidated request path concatenated into authority poisons request.url.hostname
mcpPyPI 1.6.0 HIGH 10 advisories 1.9.41.10.01.23.0+2 more
- HIGHGHSA-9h52-p55h-vw2f CVE-2025-66416 PYSEC-2026-1617Model Context Protocol (MCP) Python SDK does not enable DNS rebinding protection by default
- HIGHGHSA-jpw9-pfvf-9f58 CVE-2026-52869 PYSEC-2026-3482MCP Python SDK: HTTP transports serve session requests without verifying the authenticated principal
- HIGHGHSA-vj7q-gjh5-988w CVE-2026-59950 PYSEC-2026-3483MCP Python SDK: WebSocket server transport does not support Host/Origin validation
- HIGHGHSA-3qhf-m339-9g5v CVE-2025-53366 PYSEC-2026-1616MCP Python SDK vulnerability in the FastMCP Server causes validation error, leading to DoS
- HIGHGHSA-j975-95f5-7wqh CVE-2025-53365 PYSEC-2026-1618MCP Python SDK has Unhandled Exception in Streamable HTTP Transport, Leading to Denial of Service
- MEDIUMPYSEC-2026-3483 CVE-2026-59950 GHSA-vj7q-gjh5-988wMCP Python SDK: WebSocket server transport does not support Host/Origin validation
- MEDIUMPYSEC-2026-1618 CVE-2025-53365 GHSA-j975-95f5-7wqhMCP Python SDK has Unhandled Exception in Streamable HTTP Transport, Leading to Denial of Service
- MEDIUMPYSEC-2026-1617 CVE-2025-66416 GHSA-9h52-p55h-vw2fModel Context Protocol (MCP) Python SDK does not enable DNS rebinding protection by default
- MEDIUMPYSEC-2026-1616 CVE-2025-53366 GHSA-3qhf-m339-9g5vMCP Python SDK vulnerability in the FastMCP Server causes validation error, leading to DoS
- MEDIUMPYSEC-2026-3482 CVE-2026-52869 GHSA-jpw9-pfvf-9f58MCP Python SDK: HTTP transports serve session requests without verifying the authenticated principal
idnaPyPI 3.10 MEDIUM 2 advisories 3.15
- MEDIUMPYSEC-2026-215 CVE-2026-45409 GHSA-65pc-fj4g-8rjxInternationalized Domain Names in Applications (IDNA) for Python provides support for Internationalized Domain Names in Applications (IDNA) and Unicode IDNA Compatibility Processing. In versions prior to 3.15, payloads such as `"\\u0660" * N` or `"\\u30fb" * N + "\\u6f22"` utilize the `valid_contexto` function prior to length rejection, and for high values of `N` will take a long time to process. This is the same issue as CVE-2024-3651, however the original remediation in 2024 was not a complete fix. A specially crafted argument to the `idna.encode()` function could consume significant resources. This may lead to a denial-of-service. Starting in version 3.14, the function rejects long inputs as soon as practicable prior to any further processing to minimize resource consumption. In version 3.15, this approach was extended to lesser used alternate functions (i.e. per-label conversions and codec support). A workaround is available. Domain names cannot exceed 253 characters in length. If this length limit is enforced prior to passing the domain to the `idna.encode()` function, it should no longer consume significant resources. This is triggered by arbitrarily large inputs that would not occur in normal usage, but may be passed to the library assuming there is no preliminary input validation by the higher-level application.
- MEDIUMGHSA-65pc-fj4g-8rjx CVE-2026-45409 PYSEC-2026-215Internationalized Domain Names in Applications (IDNA): Specially crafted inputs to idna.encode() can bypass CVE-2024-3651 fix
python-dotenvPyPI 1.1.0 MEDIUM 2 advisories 1.2.2
- MEDIUMGHSA-mf9w-mj56-hr94 CVE-2026-28684 PYSEC-2026-2270python-dotenv: Symlink following in set_key allows arbitrary file overwrite via cross-device rename fallback
- MEDIUMPYSEC-2026-2270 CVE-2026-28684 GHSA-mf9w-mj56-hr94python-dotenv reads key-value pairs from a .env file and can set them as environment variables. Prior to version 1.2.2, `set_key()` and `unset_key()` in python-dotenv follow symbolic links when rewriting `.env` files, allowing a local attacker to overwrite arbitrary files via a crafted symlink when a cross-device rename fallback is triggered. Users should upgrade to v.1.2.2 or, as a workaround, apply the patch manually.
Past security advisories
Vulnerabilities published for this server itself, from the GitHub Advisory Database.
No security advisories have been published for this server in the GitHub Advisory Database.
How it runs
| Where it runs | On your machine, started by your MCP client from this repository or its package |
|---|---|
| Transport | not stated in the code the scanner read; most local servers talk over stdio |
| Sign-in | not checked needs the live server |
| MCP SDK | mcp >=1.6.0 |
| Servers in the code | 1 (LightRAG MCP Server) |
The project's own security
| Security policy | none no SECURITY.md in the repository: report issues privately through GitHub if it is enabled |
|---|---|
| Past advisories | none in the GitHub Advisory Database |
| Last push | 2026-06-08 |
| Signed releases | not checked yet |
Where it is published
| Listed in | 4 catalogs (awesome_tensorblock, github_search, glama, mcp_toplist) |
|---|---|
| License | not stated |
| Created | 2025-04-07 |
Attack map
How the server is built and where its risky tools lead: servers, their tools, what the tools' code can do, and the traced route from a declared risky tool's argument to the operation it reaches. Click a node for details.