Research
Cantina case study: how Apex found a critical RCE bug in Spring AI
Technical analysis of CVE-2026-22738, a critical Spring AI vulnerability enabling remote code execution through unvalidated SpEL injection in vector store filters.
· Cantina
A high-severity Cypher injection vulnerability in Spring AI's Neo4j component was identified and autonomously remediated by Cantina's Apex security tool.
On March 27, 2026, a high-severity vulnerability designated as CVE-2026-22743 was published. The vulnerability affects the spring-ai-neo4j-store component of Spring AI, specifically impacting versions 1.0.0 through 1.0.4, and 1.1.0 through 1.1.3. With a CVSS v3.1 score of 7.5, the flaw enables unauthenticated, remote Cypher injection, posing a significant risk to data confidentiality in applications that integrate Spring AI with Neo4j graph databases.
The core issue resides in the Neo4jVectorFilterExpressionConverter class.
When a user-supplied string is passed as a filter expression key, the implementation embeds this string into a Cypher query property accessor using backticks (e.g., node.metadata.). While the code successfully strips double quotes from the input, it completely fails to escape embedded backticks.
Attack Vector & Impact:
Traditional remediation for CVE-2026-22743 requires a multi-step manual process to secure the application and its data:
Neo4jVectorFilterExpressionConverter logic to properly escape backticks before embedding them into queries.Cantina’s Apex identified this vulnerability through its contextual codebase analysis capabilities.
Instead of relying on rigid, pre-defined signature rules, Apex mapped the data flow from the application’s external inputs down to the spring-ai-neo4j-store dependency. During its scan, Apex flagged the doKey() function within the Neo4jVectorFilterExpressionConverter. The agent recognized that “stripping only double quotes was a mathematically insufficient sanitization” approach for backtick-delimited queries.
Apex validated the exploit path, confirming that a user payload could traverse to the Neo4j database unaltered. Upon verifying the risk, Apex autonomously generated the exact code patch required to escape the backticks, created a Pull Request, and applied the fix to the repository, closing the vulnerability before manual triage was necessary.
Apex is an agentic application security solution designed to integrate into the development lifecycle. It operates autonomously to identify, validate, and remediate codebase vulnerabilities.
Secure your codebase at the speed of modern development. Get a demo of Apex today to see how autonomous application security works in practice.