cvelo
P3 · MediumCVSS 6.5EPSS 0.6%

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

  • CVE-2026-59342
  • GHSA-v3m3-42wv-v9hm
  • EUVD-2026-141027

Description

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

Text from the CVE.org record.

Affected

  • Spring Spring Data MongoDB

    • from 5.1.0 to before 5.1.2.1
    • from 5.0.0 to before 5.0.8.1
    • from 4.5.0 to before 4.5.15
    • from 4.4.0 to before 4.4.17
    • before 3.4.22
    • from 5.1.0 to before 5.1.3
    • from 5.0.0 to before 5.0.9

Product versions from the CVE.org record.

Timeline

  1. Published

Related news

No article from the followed outlets names this vulnerability.