CVE-2026-59342Spring Data MongoDB Improper Neutralization of Special Elements in Data Query Logic
Spring
Vulnerability Summary
Spring Data MongoDB - String query logic injection via function operator bind parameter. Spring Data MongoDB's parameter binding mechanism for JSON-based query and aggregation using placeholder syntax did not contextually escape bound String argument values when those placeholders appeared inside a quoted string literal. The application is vulnerable if all of the following are true: MongoDB server-side JavaScript functions are enabled. The application accepts input parameters from untrusted sources and uses them without prior sanitization as repository query method argument of type String. The repository method is annotated with an MQL query template (e.g. @Query, @Aggregation) that uses a value placeholder inside a script expression (e.g. $accumulator, $function, $where, ...) Affected artifact: org.springframework.data:spring-data-mongodb.
CVSS v3.1 Base Metrics — Score 6.5 (MEDIUM)
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:LAttack VectorNetwork
Attack ComplexityHigh
Privileges RequiredNone
User InteractionNone
ScopeUnchanged
ConfidentialityHigh
IntegrityNone
AvailabilityLow
Affected & Patched Versions
- Spring Data MongoDB 5.1.0 through 5.1.2
- Spring Data MongoDB 5.0.0 through 5.0.8
- Spring Data MongoDB 4.5.0 through 4.5.14
- Spring Data MongoDB 4.4.0 through 4.4.16
- Spring Data MongoDB through 3.4.21
- Spring Data MongoDB 5.1.3 (open source)
- Spring Data MongoDB 5.0.9 (open source)
- Spring Data MongoDB 5.1.2.1 (commercial support only)
- Spring Data MongoDB 5.0.8.1 (commercial support only)
- Spring Data MongoDB 4.5.15 (commercial support only)
- Spring Data MongoDB 4.4.17 (commercial support only)
- Spring Data MongoDB 3.4.22 (commercial support only)
What to do
Fix it during your normal patch cycle. No exploitation is confirmed yet.
- Check whether you run Spring Data MongoDB and which version.
- Update to a patched version listed above, then confirm the new version.
Timeline
- Nov 19, 2026Published
- Nov 19, 2026Record last modified
Score, severity and exploitation changes are tracked from the day Watchtower started logging them.
Get notified about new Spring Data MongoDB CVEsYou are reading CVE-2026-59342. Get an email when KEV listings, exploits or new CVEs match your stack.
Set up CVE alertsRelated Coverage
More Spring Data MongoDB CVEs
External References
- Vendor Advisoryhttps://spring.io/security/cve-2026-59342
Data last checked: Nov 20, 2026 05:01 UTC