Skip to main content

Spring Data MongoDB CVE-2026-41696

| EUVDEUVD-2026-35892 MEDIUM
Improper Neutralization of Special Elements in Data Query Logic (CWE-943)
2026-06-10 security@vmware.com GHSA-hc43-m36c-8v33
5.9
CVSS 3.1 · Vendor: vmware
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Identify application endpoint accepting user-controlled search input
  2. Delivery
    Submit crafted regex string as query parameter
  3. Exploit
    Spring Data MongoDB binds value without sufficient regex quoting
  4. Execution
    MongoDB evaluates attacker-modified regular expression
  5. Persist
    Query matches unintended documents in collection
  6. Impact
    Sensitive records returned to attacker

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Query language parameterization
Exploitation Conditions

Exploitation requires that the application uses a Spring Data MongoDB repository method annotated with @Query that includes a regex parameter binding (e.g., $regex: ?0), AND that attacker-controlled input reaches that bound parameter without prior sanitization or escaping. Applications that do not use @Query with regex bindings are entirely unaffected. The CVSS AC:H rating reflects this conditional dependency. From the network perspective, no authentication is required (PR:N) and no user interaction is needed (UI:N), but the application must expose the vulnerable code path to attacker-reachable requests. Exploitation is limited by: (1) the application must use this specific annotation and binding pattern; (2) user input must flow unsanitized into the regex parameter; (3) the attacker must be able to reach the relevant endpoint. These conditions meaningfully narrow the exposed population beyond what the raw CVSS network vector implies.

Impact

The CVSS 5.9 Medium score is composed of a network attack vector (AV:N), no required privileges (PR:N), no user interaction (UI:N), but high attack complexity (AC:H), unchanged scope (S:U), and impact confined to confidentiality (C:H) with no integrity or availability consequence. The AC:H rating is the primary risk moderator and reflects that exploitation is conditional on the target application using @Query with regex binding and exposing that path to attacker-controlled input - a specific pattern, though not rare in Spring Data MongoDB codebases. No EPSS score was provided in the source data, so exploitation probability cannot be quantified. The vulnerability is not listed in CISA KEV, and no public exploit code has been identified. Real-world risk is moderate-to-significant for applications matching the vulnerable pattern: the C:H impact means a successful exploit could expose the full result set of a query, potentially leaking sensitive MongoDB documents. Applications that do not use @Query with regex parameters are unaffected, which limits the population at risk compared to a framework-wide vulnerability.

Exploit ScenarioDerived

An application exposes a product search API that passes a user-supplied search term directly to a Spring Data MongoDB repository method annotated with @Query containing a regex binding such as { 'name': { $regex: ?0, $options: 'i' } }. An attacker submits a crafted string containing unescaped regex syntax that breaks out of the intended literal quoting, causing MongoDB to evaluate a modified regular expression that matches a broader set of documents - including records the attacker is not intended to access. No public exploit code has been identified, but the injection pattern is well-understood from prior NoSQL and regex injection research and does not require elevated tooling.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jun 10, 2026

Regex parameter binding in Spring Data MongoDB's @Query annotation fails to sufficiently quote user-supplied strings, enabling NoSQL injection that can manipulate query semantics. Unauthenticated remote attackers (PR:N, AV:N) who can influence the bound parameter in applications using this pattern may break out of the intended regular expression context to retrieve unintended documents, resulting in high-impact confidentiality compromise. No confirmed active exploitation or public exploit code has been identified at time of analysis; the CVSS Attack Complexity of High reflects a dependency on a specific application-level coding pattern.

RemediationAI

Upgrade Spring Data MongoDB to a version beyond the listed affected upper bounds in each branch. The vendor advisory at https://spring.io/security/cve-2026-41696 should be consulted for the exact confirmed fix versions - the source data supplied to this analysis identifies affected ranges but does not explicitly name the first patched release for each branch, so specific fix version numbers cannot be cited here without risk of error. As an immediate compensating control where upgrade is not feasible, developers should audit all repository interfaces using @Query annotations with regex parameter bindings and apply application-level escaping of regex metacharacters before passing values to these methods - for example, wrapping user input with Java's Pattern.quote() prior to binding. Alternatively, refactoring affected queries to use MongoTemplate with an explicit Criteria.where().regex() call allows the application to control quoting explicitly. Removing user-controlled input from @Query regex parameters entirely eliminates the attack surface with no trade-offs. Restricting external access to endpoints that invoke affected repository methods is a partial network-layer mitigation but does not address insider or authenticated-user risk.

Affected VersionsENISA

Spring Data MongoDB 5.0.0 <5.0.6
Spring Data MongoDB 4.0.0 <4.0.16
Spring Data MongoDB 4.2.0 <4.2.16
Spring Data MongoDB 4.1.0 <4.1.15
Spring Data MongoDB 4.4.0 <4.4.15
Spring Data MongoDB 3.4.0 <3.4.20
Spring Data MongoDB 4.5.0 <4.5.12
Spring Data MongoDB 4.3.0 <4.3.17

Affected Packages

maven org.springframework.data:spring-data-mongodb fix: 4.5.12, 5.0.6
euvd spring_data_mongodb fix: 3.4.20, 4.0.16, 4.1.15, 4.2.16, 4.3.17, 4.4.15, 4.5.12, 5.0.6

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in maven, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Spring Data MongoDB is a Java-based persistence layer in the Spring ecosystem (maintained by VMware/Broadcom) that maps repository method signatures to MongoDB queries. The @Query annotation allows developers to embed MongoDB query templates directly on repository interfaces, with ?0-style placeholder syntax for parameter binding. When a regex operator (e.g., { 'field': { $regex: ?0 } }) is used and a user-supplied value is bound, the framework is expected to quote the value so it is treated as a literal pattern. CWE-943 (Improper Neutralization of Special Elements in Data Query Logic - NoSQL) describes this root cause class: the framework interpolates the parameter into the query structure without fully neutralizing regex metacharacters or operator delimiters, allowing the attacker to alter the query's logical behavior. No CPE strings were supplied in the source data; affected product versions are derived solely from the vendor advisory ranges spanning major branches 3.4.x through 5.0.x.

Know when Spring Data Mongodb gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (vmware) PRIMARY 5.9 MEDIUM
AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
Red Hat 5.9 MEDIUM

Primary rating from Vendor (vmware).

CVSS VectorVendor: vmware

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

Lifecycle Timeline

1
Patch available
Jun 10, 2026 - 02:01 EUVD

DescriptionCVE.org

Spring Data MongoDB repository query methods annotated with @Query that use regex parameter binding perform insufficient validation of the bound parameter. An attacker can supply a crafted string to break out of the intended regular expression quoting.

Affected versions: Spring Data MongoDB 5.0.0 through 5.0.5; 4.5.0 through 4.5.11; 4.4.0 through 4.4.14; 4.3.0 through 4.3.16; 4.2.0 through 4.2.15; 4.1.0 through 4.1.14; 4.0.0 through 4.0.15; 3.4.0 through 3.4.19.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 37 maven packages depend on org.springframework.data:spring-data-mongodb (13 direct, 24 indirect)

Ecosystem-wide dependent count for version 5.0.0.

Threat Intelligence Overview

EPSS Score
0.0%
Top 90% exploitable
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment Vendor VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

30
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +30
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

NoSQL injection exploits databases that don't use traditional SQL syntax-like MongoDB, CouchDB, or Redis-by manipulating queries through unsanitized user input.

Related Vulnerabilities in Spring Data MongoDB Injection Vulnerabilities

View all 2

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy