The camel-neo4j producer builds the Cypher WHERE clause for its match/retrieve and delete operations from the CamelNeo4jMatchProperties map. CVE-2025-66169 addressed Cypher injection through the property values by binding them as query parameters ($paramN), but the property names (the JSON keys of that map) were still concatenated into the query string verbatim in Neo4jProducer.retrieveNodes() and deleteNode(). A property name containing Cypher syntax therefore alters the structure of the executed query. Where a route maps untrusted input into the CamelNeo4jMatchProperties map - for example by passing a request body as the match map, or from a consumer that does not filter inbound Camel* headers - an attacker who controls the JSON key names can inject arbitrary Cypher and read, modify or delete any node or relationship in the Neo4j database. The CamelNeo4jMatchProperties header is itself Camel-prefixed and is filtered by the HTTP header-filter strategy, so a plain HTTP client cannot set it directly; the issue is reachable through routes that deliberately or inadvertently carry untrusted data into that header.
This issue affects Apache Camel: from 4.10.0 before 4.14.8, from 4.15.0 before 4.18.3, from 4.19.0 before 4.21.0.
Users are recommended to upgrade to version 4.21.0, which fixes the issue. If users are on the 4.14.x LTS releases stream, then they are suggested to upgrade to 4.14.8. If users are on the 4.18.x releases stream, then they are suggested to upgrade to 4.18.3. For deployments that cannot upgrade immediately, do not populate the CamelNeo4jMatchProperties map from untrusted input: validate or allow-list the property names (for example against ^[A-Za-z_][A-Za-z0-9_]*$) before the Neo4j producer, and ensure that any consumer feeding such a route filters inbound Camel* / camel* headers so the match header cannot be supplied by an external sender.
Summary
AIThe Apache Camel Neo4j producer inserts property names from CamelNeo4jMatchProperties into Cypher queries without neutralizing them. An attacker who controls those names can read, modify, or delete nodes and relationships if a route passes untrusted input into the map. A plain HTTP client cannot set the CamelNeo4jMatchProperties header directly because Camel's HTTP header filter blocks it.
Who should check
Teams running Maven package org.apache.camel:camel-neo4j on versions 4.10.0 through 4.14.7, 4.15.0 through 4.18.2, or 4.19.0 through 4.20.x should check their routes.
What to do
- 1Upgrade to 4.21.0, or to 4.14.8 or 4.18.3 on those respective release streams.
- 2If you cannot upgrade immediately, validate or allow-list property names before the Neo4j producer.
- 3Ensure consumers feeding affected routes filter inbound Camel* and camel* headers.