CVE-2026-59342 PUBLISHED

Spring Data MongoDB String query logic injection via function operator bind parameter

Assigner: vmware
Reserved: 04.07.2026 Published: 02.12.2026 Updated: 02.12.2026

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 , ...)

Metrics

CVSS Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:L
CVSS Score: 6.5

Product Status

Vendor Spring
Product Spring Data MongoDB
Versions
  • affected from 5.1.0 to 5.1.2.1 (excl.)
  • affected from 5.0.0 to 5.0.8.1 (excl.)
  • affected from 4.5.0 to 4.5.15 (excl.)
  • affected from 4.4.0 to 4.4.17 (excl.)
  • affected from 0 to 3.4.22 (excl.)
  • affected from 5.1.0 to 5.1.3 (excl.)
  • affected from 5.0.0 to 5.0.9 (excl.)

Credits

  • The issue was reported responsibly by Tim Zheng (tim.zheng) - https://github.com/EaEa0001

References