Mar 13, 2026·5 min read·33 visits
A Cypher injection flaw in Graphiti < 0.28.2 allows low-privileged attackers to execute arbitrary database queries against Neo4j, FalkorDB, and Neptune backends via unsanitized search filters.
Graphiti versions prior to 0.28.2 contain a high-severity Cypher injection vulnerability (CWE-943) in the search-filter construction logic for non-Kuzu backends. This flaw permits an attacker to execute arbitrary Cypher queries against the underlying database, either directly or via indirect prompt injection in Model Context Protocol (MCP) deployments.
Graphiti is a temporal context graph framework used to build stateful AI agents. The framework interacts with multiple graph database backends to store and retrieve contextual data. A vulnerability exists in the query construction logic for Neo4j, FalkorDB, and Neptune backends.
The vulnerability, tracked as CVE-2026-32247, is an instance of CWE-943 (Improper Neutralization of Special Elements in Data Query Logic). It specifically manifests as a Cypher injection flaw within the search-filter processing pipeline. Kuzu backends remain unaffected due to their use of parameterized queries for label handling.
Attackers with low-privileged access to the Graphiti API can leverage this flaw to execute arbitrary database queries. In deployments utilizing the Model Context Protocol (MCP), attackers can trigger the injection indirectly via malicious prompts supplied to an LLM client. The vulnerability was patched in version 0.28.2.
The root cause resides in the insecure string interpolation of user-supplied labels during the construction of Cypher MATCH clauses. Graphiti relies on Cypher labels to filter nodes within the graph database. Backends such as Neo4j, FalkorDB, and Neptune require structural identifiers like labels to be hardcoded into the query string rather than parameterized.
In affected versions, Graphiti extracts the node_labels list from the SearchFilters object and concatenates the elements using the pipe (|) operator. The application prepends a colon to the joined string and directly inserts the result into the query template. The application performs no validation or sanitization on the label values before this concatenation.
Because the label components are unvalidated, an attacker can input strings containing structural Cypher syntax characters. When the database parses the concatenated query string, it interprets the attacker's payload as executable Cypher commands rather than literal label values. This interpretation allows the attacker to break out of the intended MATCH clause and append arbitrary database operations.
The vulnerable code pattern concatenates the node_labels list directly into the query string without validation. The application constructs a filter string and interpolates it into the MATCH statement. This implementation trusts the structural integrity of the user-supplied data.
# Vulnerable Implementation (Conceptual)
node_label_filter = 'n:' + '|'.join(filters.node_labels)
query = f"MATCH ({node_label_filter}) ... "The patch introduced in commit 7d65d5e77e89a199a62d737634eaa26dbb04d037 replaces this insecure interpolation with strict input validation. The developers implemented a regex pattern to enforce a restrictive whitelist on all label and group ID values. This regex strictly limits inputs to alphanumeric characters and underscores.
# Patched Implementation Helper
SAFE_CYPHER_IDENTIFIER_PATTERN = re.compile(r'^[A-Za-z_][A-Za-z0-9_]*$')The patch applies this regex via Pydantic validators on the Node and SearchFilters models. The validation logic ensures that all user-supplied labels start with a letter or underscore. The developers also updated the node_search_filter_query_constructor and persistence layers to explicitly call these validation helpers, preventing bypasses via direct model construction.
Exploiting CVE-2026-32247 requires the attacker to supply a crafted payload via the node_labels parameter. An attacker can authenticate to the Graphiti API directly and submit the payload within a standard search request. A more complex vector involves indirect prompt injection in Model Context Protocol (MCP) environments.
An attacker provides a malicious prompt to an LLM that is configured to use the Graphiti MCP server as a tool. The prompt instructs the LLM to invoke the search_nodes tool with the payload embedded in the entity_types argument. Graphiti maps the entity_types argument directly to the vulnerable node_labels field.
A standard payload takes the form of Person) DETACH DELETE n RETURN n //. Upon execution, the database engine processes the payload, closing the parenthesis to break out of the original MATCH context. The DETACH DELETE command executes immediately after, effectively destroying all nodes and relationships within the target graph database.
The vulnerability carries a CVSS 3.1 base score of 8.1, reflecting a high-severity threat to data confidentiality and integrity. Successful exploitation allows complete control over the underlying graph database. An attacker can read arbitrary data by appending MATCH and RETURN clauses to the injected query.
Data integrity is equally compromised. Attackers can modify existing nodes, forge temporal events, or delete the entire dataset using the DETACH DELETE operation. The application's availability is technically unaffected at the system configuration level, although data destruction effectively halts application functionality.
The vulnerability does not grant direct operating system access or remote code execution on the host machine. The execution context is strictly confined to the database service account permissions. Organizations using vulnerable versions expose their complete temporal context history to total compromise.
The primary remediation for CVE-2026-32247 is upgrading to Graphiti version 0.28.2. This release contains the complete regex-based validation patch across all model constructors and persistence layers. Organizations utilizing Graphiti should deploy this update immediately across all environments.
Administrators should enforce the principle of least privilege on the database service accounts used by Graphiti. Restricting the database user from executing destructive commands like DETACH DELETE limits the impact of successful injections. This backend configuration serves as a critical defense-in-depth measure.
In MCP environments, security teams must treat all LLM outputs as untrusted input. Implementing an intermediary validation layer between the LLM client and the Graphiti server provides additional protection against indirect prompt injection vectors. Monitoring tool-calling behavior for anomalous payload structures aids in detecting exploitation attempts.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N| Product | Affected Versions | Fixed Version |
|---|---|---|
getzep/graphiti Zep Software | < 0.28.2 | 0.28.2 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-943 |
| Attack Vector | Network |
| CVSS Score | 8.1 (High) |
| Impact | High Confidentiality, High Integrity |
| Exploit Status | PoC Available |
| CISA KEV Status | Not Listed |
Improper Neutralization of Special Elements in Data Query Logic
Code16 Sharp versions from 9.0.0 up to (but not including) 9.22.3 are vulnerable to a missing authorization flaw in the Quick Creation Command feature. The ApiEntityListQuickCreationCommandController fails to validate entity-level 'create' policies before returning administrative form designs or processing database modifications. Authenticated users with restricted access can bypass policy boundaries to access creation configurations and insert records.
CVE-2026-49471 is a high-severity security vulnerability in Serena, an AI-assisted coding Model Context Protocol (MCP) toolkit. In versions prior to v1.5.2, Serena's built-in web dashboard exposes an unauthenticated Flask API on a predictable port. Lacking host validation and CSRF protections, this endpoint is vulnerable to DNS Rebinding. An attacker can lure a user to a malicious webpage, bypass the Same-Origin Policy (SOP), rewrite the AI agent's persistent memory, and execute arbitrary commands on the host operating system via the autonomous agent's shell execution engine.
The trapster honeypot package is vulnerable to a remote denial of service (DoS) vulnerability due to uncontrolled recursion during the parsing of malformed DNS compression pointers in the decode_labels function.
A critical Use-After-Free (UAF) memory corruption vulnerability exists in the oneringbuf Rust crate prior to version 0.8.0. The vulnerability allows safe Rust code to instantiate and clone reference wrappers that point to heap-allocated ring buffers. Dropping one wrapper prematurely reclaims the backing memory, leading to dangling pointer references and subsequent Use-After-Free or Double Free states.
Januscape (CVE-2026-53359) is a critical Use-After-Free vulnerability in the x86 Shadow MMU component of the Linux Kernel's KVM subsystem. A logic error in shadow page tracking permits unauthorized page reuse without validating architectural execution roles, leading to dangling pointers in reverse mapping (rmap) tracking entries during guest memory teardown.
CVE-2026-48282 is a critical unauthenticated path traversal and arbitrary file write vulnerability in the Remote Development Services (RDS) component of Adobe ColdFusion. The vulnerability allows a remote, unauthenticated attacker to bypass directory boundaries and write arbitrary files, including CFML-based web shells, onto the host server. This flaw is actively exploited in the wild and enables full unauthenticated remote code execution under the privileges of the ColdFusion service account.