CVE-2026-40978
8.8Spring · Spring AI (CosmosDBVectorStore)
A SQL injection vulnerability in the Spring AI CosmosDBVectorStore component allows authenticated attackers to execute arbitrary SQL queries via crafted document IDs.
Executive summary
A critical SQL injection flaw in Spring AI allows authenticated attackers to execute unauthorized database queries, posing a significant risk of data compromise and system manipulation.
Vulnerability
The vulnerability is an Improper Neutralization of Special Elements used in an SQL Command (CWE-89). It occurs within the CosmosDBVectorStore component, where inadequate sanitization of document IDs permits an authenticated user to perform SQL injection attacks.
Business impact
Successful exploitation allows an attacker to interact directly with the underlying database, potentially leading to unauthorized data exfiltration, modification, or deletion. With a CVSS score of 8.8, this high-severity vulnerability represents a substantial threat to data confidentiality and integrity, necessitating immediate attention to prevent potential service disruption or regulatory non-compliance.
Remediation
Immediate Action: Upgrade the Spring AI dependency to version 1.0.6 or 1.1.5 immediately to incorporate the necessary security patches.
Proactive Monitoring: Review database audit logs for unusual query patterns or syntax errors that may indicate injection attempts targeting the CosmosDBVectorStore.
Compensating Controls: Ensure that database service accounts follow the principle of least privilege, limiting the scope of what an attacker can achieve even if an injection is successful.
Exploitation status
Public Exploit Available: Unknown
Analyst recommendation
Given the high CVSS score and the critical nature of SQL injection flaws, organizations should prioritize upgrading the affected Spring AI components. Failure to apply these updates leaves the application database vulnerable to unauthorized access and manipulation by any authenticated user.