8.1high
Graphiti vulnerable to Cypher Injection via unsanitized node_labels in search filters
- Severity
- 8.1high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.42% (higher than 38% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-gg5m-55jj-8m5gPYSEC-2026-2504
Description
Graphiti is a framework for building and querying temporal context graphs for AI agents. Graphiti versions before 0.28.2 contained a Cypher injection vulnerability in shared search-filter construction for non-Kuzu backends. Attacker-controlled label values supplied through SearchFilters.node_labels were concatenated directly into Cypher label expressions without validation. In MCP deployments, this was exploitable not only through direct untrusted access to the Graphiti MCP server, but also through prompt injection against an LLM client that could be induced to call search_nodes with attacker-controlled entity_types values. The MCP server mapped entity_types to SearchFilters.node_labels, which then reached the vulnerable Cypher construction path. Affected backends included Neo4j, FalkorDB, and Neptune. Kuzu was not affected by the label-injection issue because it used parameterized label handling rather than string-interpolated Cypher labels. This issue was mitigated in 0.28.2.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| getzep graphiti | < 0.28.2, before 0.28.2 | CVE List, NVD |
| graphiti-core (PyPI) | before 0.28.2 | GitHub Advisory Database, PyPA Advisory Database |
All scores
| GitHub_M | 8.1high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N |
| GitHub | 8.1high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N |
| PyPA Advisory Database | 8.1high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.
What each source says
CVE List
Graphiti is a framework for building and querying temporal context graphs for AI agents. Graphiti versions before 0.28.2 contained a Cypher injection vulnerability in shared search-filter construction for non-Kuzu backends. Attacker-controlled label values supplied through SearchFilters.node_labels were concatenated directly into Cypher label expressions without validation. In MCP deployments, this was exploitable not only through direct untrusted access to the Graphiti MCP server, but also through prompt injection against an LLM client that could be induced to call search_nodes with attacker-controlled entity_types values. The MCP server mapped entity_types to SearchFilters.node_labels, which then reached the vulnerable Cypher construction path. Affected backends included Neo4j, FalkorDB, and Neptune. Kuzu was not affected by the label-injection issue because it used parameterized label handling rather than string-interpolated Cypher labels. This issue was mitigated in 0.28.2.
GitHub Advisory Database
Summary
Graphiti versions before 0.28.2 contained a Cypher injection vulnerability in shared search-filter construction for non-Kuzu backends. Attacker-controlled label values supplied through SearchFilters.node_labels were concatenated directly into Cypher label expressions without validation.
In MCP deployments, this was exploitable not only through direct untrusted access to the Graphiti MCP server, but also through prompt injection against an LLM client that could be induced to call search_nodes with attacker-controlled entity_types values. The MCP server mapped entity_types to SearchFilters.node_labels, which then reached the vulnerable Cypher construction path.
Affected backends included Neo4j, FalkorDB, and Neptune. Kuzu was not affected by the label-injection issue because it used parameterized label handling rather than string-interpolated Cypher labels.
This issue was mitigated in 0.28.2.
Affected Versions
0.28.1and earlier
Fixed Version
0.28.2
Affected Components
- Graphiti Core search filter construction
- Graphiti MCP Server
search_nodeswhen used by an LLM client processing untrusted prompts
Technical Details
Before 0.28.2, Graphiti joined SearchFilters.node_labels with | and inserted the result directly into Cypher label expressions in the shared search-filter constructors used by non-Kuzu providers.
The vulnerable logic was effectively:
node_labels = '|'.join(filters.node_labels)node_label_filter = 'n:' + node_labels
The same pattern was also used in edge-search filter construction.
In MCP deployments, search_nodes accepted an entity_types argument and passed it directly to SearchFilters(node_labels=entity_types). An attacker who could influence prompts processed by an LLM client with Graphiti MCP access could use prompt injection to steer the model into invoking search_nodes with crafted entity_types values containing Cypher syntax. Those values would then be interpolated into Cypher before 0.28.2.
Impact
Successful exploitation could allow arbitrary Cypher execution within the privileges of the configured graph database connection, including:
- reading graph data outside the intended search scope
- modifying graph data
- deleting graph data
- bypassing logical group isolation enforced at the query layer
Additional Note on group_ids
Separately, the original report also identified a narrower issue in fulltext search query construction for unvalidated group_ids. That issue was distinct from the Cypher label-injection path described above and was also mitigated in 0.28.2.
Mitigation
Upgrade to 0.28.2 or later.
Version 0.28.2 added:
- validation of
SearchFilters.node_labels - defense-in-depth label validation in shared search-filter constructors
- validation of entity node labels in persistence query builders
- validation of
group_idsin shared search fulltext helpers
Workarounds
If you cannot upgrade immediately:
- do not expose Graphiti MCP tools to untrusted users or to LLM workflows that process untrusted prompt content
- avoid passing untrusted values into
SearchFilters.node_labelsor MCPentity_types - restrict graph database credentials to the minimum privileges required
Credits
@4n93L for their original report.
NVD (es)
Graphiti es un framework para construir y consultar grafos de contexto temporal para agentes de IA. Las versiones de Graphiti anteriores a la 0.28.2 contenían una vulnerabilidad de inyección Cypher en la construcción compartida de filtros de búsqueda para backends que no eran Kuzu. Los valores de etiquetas controlados por el atacante, suministrados a través de SearchFilters.node_labels, se concatenaban directamente en expresiones de etiquetas Cypher sin validación. En las implementaciones de MCP, esto era explotable no solo a través del acceso directo no confiable al servidor MCP de Graphiti, sino también a través de la inyección de prompts contra un cliente LLM que podía ser inducido a llamar a search_nodes con valores de entity_types controlados por el atacante. El servidor MCP mapeaba los entity_types a SearchFilters.node_labels, que luego alcanzaban la ruta de construcción Cypher vulnerable. Los backends afectados incluían Neo4j, FalkorDB y Neptune. Kuzu no se vio afectado por el problema de inyección de etiquetas porque utilizaba un manejo de etiquetas parametrizado en lugar de etiquetas Cypher interpoladas por cadena. Este problema se mitigó en la 0.28.2.
References
| https://github.com/getzep/graphiti/security/advisories/GHSA-gg5m-55jj-8m5g | mitigation, vendor-advisory, web | |
| https://github.com/getzep/graphiti/pull/1312 | issue-tracking, patch, web | |
| https://github.com/getzep/graphiti/commit/7d65d5e77e89a199a62d737634eaa26dbb04d037 | patch, web | |
| https://github.com/getzep/graphiti/releases/tag/v0.28.2 | release-notes, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-32247 | advisory | |
| https://github.com/getzep/graphiti | package | |
| https://pypi.org/project/graphiti-core | package | |
| https://github.com/advisories/GHSA-gg5m-55jj-8m5g | advisory | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-32247 changed 2026-03-13 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-gg5m-55jj-8m5g changed 2026-07-13 | CC-BY-4.0 |
| NVD | CVE-2026-32247 changed 2026-06-17 | Public domain |
| PyPA Advisory Database | PYSEC-2026-2504 changed 2026-07-13 | CC-BY-4.0 |