Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐍 PyPI

GHSA-gg5m-55jj-8m5g

HIGH

Graphiti vulnerable to Cypher Injection via unsanitized node_labels in search filters

Also known asCVE-2026-32247
Published
Mar 12, 2026
Updated
Mar 14, 2026
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed

EPSS Exploitation Probability

via FIRST.org ↗
0.3%probability of exploitation in next 30 days
Lower Risk26th percentile+0.33%
0.00%0.28%0.56%0.84%0.0%0.0%0.0%0.3%Apr 26Jun 26Jun 26

EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.

Blast Radius

1 pkg affected
🐍graphiti-core

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.

Description

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.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
🐍PyPIgraphiti-coreall versions0.28.2

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for graphiti-core. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.

  2. Fix

    Update graphiti-core to 0.28.2 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-gg5m-55jj-8m5g is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 pinpoints whether GHSA-gg5m-55jj-8m5g is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.

Tailored to GHSA-gg5m-55jj-8m5g. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

### 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
O3 Security · Impact-Aware SCA

Is GHSA-gg5m-55jj-8m5g in your dependencies?

O3 detects GHSA-gg5m-55jj-8m5g across PyPI dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.