CVE-2026-40978: SQL injection vulnerability in Spring AI's `CosmosDBVectorStore` allows attackers to execute arbitrary SQL queries via crafted document IDs.
CVE-2026-40978 · Severity: high · CVSS 8.8 · Published 2026-04-28
SQL injection vulnerability in Spring AI's `CosmosDBVectorStore` allows attackers to execute arbitrary SQL queries via crafted document IDs.
Affected versions:
Spring AI: 1.0.0 - 1.0.5 (fixed in 1.0.6), 1.1.0 - 1.1.4 (fixed in 1.1.5)
Yes. org.springframework.ai:spring-ai-azure-cosmos-db-store (Maven): upgrade to 1.0.6 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
Am I affected by CVE-2026-40978?
Check whether you run org.springframework.ai:spring-ai-azure-cosmos-db-store (Maven) or VMware Spring Ai at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
How to fix
org.springframework.ai:spring-ai-azure-cosmos-db-store (Maven): upgrade to 1.0.6 or later
# set org.springframework.ai:spring-ai-azure-cosmos-db-store to 1.0.6 in your pom.xml or build.gradle