CVE-2026-59342 — Spring Data MongoDB (5.1.2.1) — MEDIUM Vulnerability
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 , ...)
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 , ...)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
CVE-2026-59342
CVSS 6.5/10 · MEDIUM · 02.12.2026
Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:L
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 WHAT IS THIS VULNERABILITY?
Summary: 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 …
Affected: Spring Spring Data MongoDB
⚡ ATTACK VECTOR
Network / Remote (AV:N) · no authentication required (PR:N) · no user interaction (UI:N).
🌍 REAL WORLD IMPACT
All confidential data readable/stealable; reduced availability or partial DoS (A:L).
🛡️ REMEDIATION
→ Apply vendor security update for Spring Spring Data MongoDB.
→ Pre-patch: put service behind VPN or apply IP allowlist.
→ Add WAF rule, create IDS alert for anomalous traffic.
⚠️ URGENCY
📋 Routine update cycle (30 days)
────────────────────────────────────────
[Automated Technical Vulnerability & CVSS Vector Analysis]
FOFA Query