CVE-2026-46591 Overview
CVE-2026-46591 is a Cypher injection vulnerability in the Apache Camel Neo4J component. The camel-neo4j producer constructs the Cypher WHERE clause for match, retrieve, and delete operations from the CamelNeo4jMatchProperties map. A prior fix, CVE-2025-66169, parameterized property values but left property names concatenated into the query string verbatim in Neo4jProducer.retrieveNodes() and deleteNode(). Attackers who control JSON key names in that map can inject arbitrary Cypher and read, modify, or delete any node or relationship in the Neo4j database. The flaw is tracked under [CWE-943] Improper Neutralization of Special Elements in Data Query Logic.
Critical Impact
Attackers who can influence the CamelNeo4jMatchProperties map keys can execute arbitrary Cypher queries against the backing Neo4j database, exposing or destroying stored graph data.
Affected Products
- Apache Camel 4.10.0 through 4.14.7
- Apache Camel 4.15.0 through 4.18.2
- Apache Camel 4.19.0 through 4.20.x (fixed in 4.21.0)
Discovery Timeline
- 2026-07-06 - CVE-2026-46591 published to NVD
- 2026-07-08 - Last updated in NVD database
Technical Details for CVE-2026-46591
Vulnerability Analysis
The Apache Camel Neo4J producer builds Cypher queries by iterating the CamelNeo4jMatchProperties map. Property values are bound as parameters ($paramN), but property names are concatenated directly into the query string. Any Cypher syntax present in a JSON key therefore changes the structure of the executed query. This bypasses the earlier remediation delivered in CVE-2025-66169, which only sanitized values.
The impact affects confidentiality and integrity of the Neo4j graph. An attacker can enumerate nodes and relationships, tamper with graph data, or delete records outright. Availability of the Neo4j service itself is not directly impacted by the injection primitive.
Root Cause
The root cause is unsafe string concatenation of untrusted identifiers in Neo4jProducer.retrieveNodes() and Neo4jProducer.deleteNode(). Cypher parameter binding was applied to values but not to property names, leaving the query structure controllable by any caller who influences the map keys.
Attack Vector
The CamelNeo4jMatchProperties header is Camel-prefixed and blocked by the default HTTP header filter strategy. A remote HTTP client cannot set it directly. The vulnerability becomes reachable when a Camel route copies untrusted input into that map, for example by binding an incoming request body to the match map, or when a consumer forwards inbound Camel* or camel* headers without filtering. In those routes, an attacker who controls JSON key names injects Cypher fragments that alter the WHERE clause and gain full read, modify, or delete access to the graph.
No public proof-of-concept exploit or CISA KEV listing exists for CVE-2026-46591 at the time of publication.
Detection Methods for CVE-2026-46591
Indicators of Compromise
- Neo4j query logs containing unexpected Cypher keywords (MATCH, DELETE, DETACH, RETURN, OR, //) appearing inside property-name positions of WHERE clauses generated by camel-neo4j.
- Camel exchange logs showing CamelNeo4jMatchProperties populated with keys containing whitespace, backticks, colons, or non-identifier characters.
- Anomalous bulk read, update, or delete operations against Neo4j originating from Camel application service accounts.
Detection Strategies
- Enable Neo4j query.log and alert on queries whose text originates from camel-neo4j yet contains multiple statements or clauses beyond the expected MATCH (n) WHERE ... RETURN n shape.
- Inspect Camel routes for direct mapping of HTTP bodies or headers into the CamelNeo4jMatchProperties header without an allow-list validator.
- Correlate application logs with Neo4j audit output to identify property-name values that fail the identifier pattern ^[A-Za-z_][A-Za-z0-9_]*$.
Monitoring Recommendations
- Monitor for spikes in Cypher query volume or latency from Camel integration hosts, which can indicate mass enumeration.
- Track deployed Apache Camel versions across the estate and flag any instance running 4.10.0–4.14.7, 4.15.0–4.18.2, or 4.19.0–4.20.x that includes camel-neo4j.
- Alert on Neo4j write operations from routes that were designed as read-only consumers.
How to Mitigate CVE-2026-46591
Immediate Actions Required
- Upgrade Apache Camel to 4.21.0 on the main release stream.
- On the 4.14.x LTS stream, upgrade to 4.14.8.
- On the 4.18.x stream, upgrade to 4.18.3.
- Audit every Camel route that references the camel-neo4j component to determine whether external input reaches the match properties map.
Patch Information
The Apache Camel project fixed the issue in versions 4.14.8, 4.18.3, and 4.21.0. Full details are available in the Apache Camel Security Advisory. Users on affected versions should apply the corresponding fix release for their branch.
Workarounds
- Do not populate CamelNeo4jMatchProperties from untrusted input; construct the map explicitly inside the route from trusted, typed fields.
- Validate or allow-list property names against ^[A-Za-z_][A-Za-z0-9_]*$ in a processor placed before the Neo4j producer.
- Ensure consumers that feed Neo4j routes filter inbound Camel* and camel* headers so external senders cannot supply the match header.
- Restrict the Neo4j account used by Camel to the minimum labels, properties, and operations required by the route.
# Configuration example: allow-list property names before the Neo4j producer
from("direct:neo4jMatch")
.process(exchange -> {
Map<String, Object> in = exchange.getIn().getBody(Map.class);
Map<String, Object> safe = new LinkedHashMap<>();
Pattern id = Pattern.compile("^[A-Za-z_][A-Za-z0-9_]*$");
for (Map.Entry<String, Object> e : in.entrySet()) {
if (!id.matcher(e.getKey()).matches()) {
throw new IllegalArgumentException("Invalid property name: " + e.getKey());
}
safe.put(e.getKey(), e.getValue());
}
exchange.getIn().setHeader("CamelNeo4jMatchProperties", safe);
})
.to("neo4j://retrieveNodes?...");
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

