CVE-2026-59342
Received Received - Intake

Spring Data MongoDB JavaScript Injection via Unsanitized String Parameters

Vulnerability report for CVE-2026-59342, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-12-02

Last updated on: 2026-12-02

Assigner: VMware

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

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-12-02
Last Modified
2026-12-02
Generated
2026-12-02
AI Q&A
2026-12-02
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 5 associated CPEs
Vendor Product Version / Range
vmware spring_data_mongodb *
spring data_mongodb From 3.4.21 (inc) to 5.1.3 (exc)
spring data_mongodb From 4.4.0 (inc) to 4.5.15 (exc)
spring data_mongodb From 5.0.0 (inc) to 5.1.3 (exc)
spring data_mongodb From 5.1.0 (inc) to 5.1.3 (exc)

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-UNKNOWN

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability involves improper escaping of String arguments in Spring Data MongoDB when used in JSON-based queries or aggregations. Attackers can inject malicious JavaScript code through untrusted input parameters if MongoDB server-side JavaScript functions are enabled and the application uses MQL query templates with placeholders inside script expressions like $accumulator, $function, or $where.

Detection Guidance

To detect this vulnerability, check if your Spring Data MongoDB application meets the conditions: MongoDB server-side JavaScript functions are enabled, untrusted String inputs are used in repository queries without sanitization, and MQL queries use placeholders inside script expressions like $accumulator, $function, or $where.

Impact Analysis

An attacker could exploit this to execute arbitrary JavaScript code on the MongoDB server, potentially leading to data theft, unauthorized access, or denial of service. The impact depends on the application's permissions and data sensitivity.

Compliance Impact

This vulnerability could lead to unauthorized data access or modification, violating GDPR's data protection principles or HIPAA's security requirements for protected health information. Compliance may be compromised if sensitive data is exposed or altered.

Mitigation Strategies

Upgrade to fixed versions of Spring Data MongoDB: 5.1.3 (OSS), 5.1.2.1 (Enterprise), 5.0.9 (OSS), 5.0.8.1 (Enterprise), 4.5.15 (Enterprise), 4.4.17 (Enterprise), or 3.4.22 (Enterprise). As a temporary measure, enclose String placeholders in quotes in @Query annotations to enforce escaping.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-59342. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart

Security Radar

News mentioning this vulnerability
Loading related security news...