CVE-2026-59342: Spring Data MongoDB String query logic injection via function operator bind parameter

Published Dec 2, 2026
·
Updated

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 Software

1 affected component
VMware Spring Data MongoDB

Event History

Dec 2, 2026
CVE Published
via MITRE·07:09 AM
Data Sourced
via MITRE·07:09 AM
DescriptionSeverity

Frequently Asked Questions

1

Which applications are exposed to this issue?

An application is exposed only when MongoDB server-side JavaScript functions are enabled, untrusted input is passed as a String repository-method argument without sanitization, and an annotated MQL template uses that placeholder within a script expression such as $accumulator, $function, or $where.

2

Does an attacker need credentials or user interaction to exploit it?

The supplied CVSS vector indicates no privileges are required and no user interaction is required. Exploitation nevertheless has high attack complexity and depends on reaching an affected repository query path with attacker-controlled input.

3

What should teams review if they cannot immediately apply an update?

Review @Query and @Aggregation repository methods for String value placeholders embedded in JavaScript-capable MQL expressions, including $accumulator, $function, and $where. Remove or avoid passing untrusted String input into those placeholders, sanitize such input before use, and disable MongoDB server-side JavaScript functions where feasible.

4

How can teams determine whether they are currently affected?

Identify whether server-side JavaScript functions are enabled in MongoDB, then inspect annotated repository query and aggregation templates. The affected pattern requires a quoted string literal containing a value placeholder within a script expression and an untrusted String argument bound to that placeholder.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203