PT-2026-59167 · Pypi · Graphiti-Core

Publicado

2026-07-13

·

Atualizado

2026-07-13

CVSS v3.1

8.1

Alta

VetorAV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N

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.1 and earlier

Fixed Version

  • 0.28.2

Affected Components

  • Graphiti Core search filter construction
  • Graphiti MCP Server search nodes when 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 ids in 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 labels or MCP entity types
  • restrict graph database credentials to the minimum privileges required

Credits

@4n93L for their original report.

Correção

Encontrou algum problema na descrição? Tem algo a acrescentar? Fique à vontade para nos escrever 👾

Identificadores relacionados

PYSEC-2026-2504

Produtos afetados

Graphiti-Core