Skip to main content

Spring Data MongoDB EUVDEUVD-2026-141027

| CVE-2026-59342 MEDIUM
2026-12-02 vmware GHSA-v3m3-42wv-v9hm
6.5
CVSS 3.1 · Vendor: vmware
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Submit crafted string to repository query parameter
  2. Delivery
    Escape quoted JavaScript string literal
  3. Exploit
    Inject server-side JavaScript into script expression
  4. Execution
    Execute injected JS in MongoDB engine
  5. Impact
    Exfiltrate sensitive data

Vulnerability Assessment

Exploitation Conditions

Exploitation requires all three conditions simultaneously: (1) MongoDB server-side JavaScript functions are enabled on the backing server - this is disabled by default in modern MongoDB, which is the single biggest limiting factor; (2) a repository method annotated with an MQL query template (@Query, @Aggregation) that places a value placeholder inside a script expression such as $where, $function, or $accumulator; and (3) untrusted external input passed as a String repository-method argument without prior sanitization. Because the bound String is not contextually escaped inside the quoted string literal, attacker input can close the literal and inject JavaScript. Limiting factors: the default-disabled server-side JS, the specific annotation/placeholder code pattern, and the requirement that the parameter be of type String and come from an unsanitized untrusted source; applications not using script-expression placeholders are unaffected.

Impact

This is a medium-severity issue (CVSS 6.5, CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:L) and the signals are internally consistent rather than conflicting. AV:N with PR:N/UI:N means an unauthenticated remote attacker can reach the flaw through normal application input, but AC:H correctly reflects that exploitation depends on a narrow stack of non-default preconditions (MongoDB server-side JavaScript enabled, a repository method whose @Query/@Aggregation template places a value placeholder inside a script expression such as $where/$function/$accumulator, and untrusted String input passed without sanitization). The impact profile - C:H, I:N, A:L - points to information disclosure (consistent with the 'Information Disclosure' tag) via injected server-side JavaScript, with no confirmed write/integrity impact and only limited availability effect. No EPSS score, KEV listing, or POC is present in the input, and the vendor (VMware/Spring) priority label is 'this_month' - not act_now/emergency - so this should be treated as a real but conditional fix-this-cycle item, not a drop-everything emergency. The gating preconditions, especially server-side JavaScript being disabled by default in modern MongoDB, substantially reduce the population of actually-vulnerable deployments relative to the raw CVSS score.

Exploit ScenarioDerived

A Spring application exposes a MongoDB-backed repository method annotated with @Query or @Aggregation whose template embeds a user-supplied String placeholder inside a script expression (e.g. $where or $function), against a MongoDB server with server-side JavaScript enabled. An unauthenticated attacker supplies a crafted String that breaks out of the surrounding quoted JavaScript string literal and injects attacker-controlled JavaScript, which executes in the MongoDB engine to read data beyond the intended query scope. No public exploit is identified in the provided data, and the high attack complexity reflects the specific configuration and code pattern that must be present.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.6% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Dec 02, 2026

Improper contextual escaping in Spring Data MongoDB's JSON query parameter binding lets remote, unauthenticated attackers break out of a quoted string literal and inject JavaScript into MongoDB server-side script expressions, which can disclose data and, to a lesser degree, affect availability. Exposure is narrow: the backing MongoDB server must have server-side JavaScript functions enabled (disabled by default in modern MongoDB), the application must use an @Query or @Aggregation MQL template that places a value placeholder inside a script expression such as $where, $function or $accumulator, and unsanitized untrusted input must be passed as a String repository-method argument. No public exploit code has been identified at time of analysis and the issue is not in CISA KEV; the vendor has released a patch, and the assigned priority is a this-month remediation cycle rather than emergency action.

RemediationAI

Vendor-released patch: upgrade Spring Data MongoDB to the fixed version for your branch - 3.4.22, 4.4.17, 4.5.15, and the 5.0.x and 5.1.x boundary releases listed in the vendor advisory (5.0.8.1/5.0.9 and 5.1.2.1/5.1.3 respectively); confirm the exact target for each branch at https://spring.io/security/cve-2026-59342 before rolling out. Where an immediate upgrade is not possible, the most effective compensating control is to keep MongoDB server-side JavaScript disabled (it is off by default in modern MongoDB releases), which removes the $where, $function and $accumulator execution sink entirely - the trade-off is that any application feature genuinely relying on those operators will stop working. A second, code-level mitigation is to remove value placeholders from inside quoted string literals within @Query/@Aggregation templates (or avoid script expressions in repository queries altogether) and to validate or reject untrusted String arguments before they reach the repository method, at the cost of development effort and possible changes to existing query semantics. Blocking untrusted input at the application boundary is only partial, since the flaw is in the library's escaping rather than in input content. Given the this-month priority, schedule the dependency upgrade in the current patch cycle and inventory repositories for script-expression placeholders to identify which services are actually in scope.

Affected VersionsENISA

Spring Data MongoDB 5.1.0 <5.1.2.1
Spring Data MongoDB 4.4.0 <4.4.17
Spring Data MongoDB 5.1.0 <5.1.3
Spring Data MongoDB 5.0.0 <5.0.9
Spring Data MongoDB 0 <3.4.22
Spring Data MongoDB 5.0.0 <5.0.8.1
Spring Data MongoDB 4.5.0 <4.5.15

Affected Packages

euvd spring_data_mongodb fix: 3.4.22, 4.4.17, 4.5.15, 5.0.8.1, 5.0.9, 5.1.2.1, 5.1.3

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Spring Data MongoDB derives MongoDB queries from repository method signatures and from MQL templates declared with @Query and @Aggregation. Those templates support placeholder syntax (for example ?0 or :name) whose bound argument values are supposed to be encoded contextually for wherever the placeholder sits in the query document. The defect is that this contextual escaping was not applied to bound String values when the placeholder appeared inside a quoted string literal - in particular inside a script expression such as $where, $function or $accumulator. Because the value is inserted without escaping the surrounding quote context, an attacker-supplied String can terminate the literal and be interpreted as JavaScript by the MongoDB server, which then executes it in the context of the query. The underlying technology chain is therefore Java/Spring Data application code, the MongoDB query language and the MongoDB server's server-side JavaScript engine. No CWE identifier was supplied with the record, but the root cause class is context-dependent output encoding of bound parameters. The CVSS vector (AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:L) reflects unauthenticated network reachability with a high attack complexity and high confidentiality impact, consistent with the multiple preconditions: server-side JavaScript must be enabled on the MongoDB deployment, the specific annotation and placeholder placement must exist in application code, and the argument must be a String sourced from untrusted input without prior sanitization. Applications that do not place placeholders inside script expressions are not affected by this flaw, and the default-disabled state of server-side JavaScript in current MongoDB releases is the single largest limiting factor.

Know when Spring gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (vmware) PRIMARY 6.5 MEDIUM
AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:L
vuln.today AI 6.5 MEDIUM

Remotely reachable via app input (AV:N, PR:N, UI:N) but AC:H because server-side JS must be enabled and a specific script-expression placeholder pattern present; injected JS reads data (C:H), no write (I:N), minor resource impact (A:L).

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:L
4.0 AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:N/VA:L/SC:N/SI:N/SA:N

Primary rating from Vendor (vmware).

CVSS VectorVendor: vmware

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
Low

Lifecycle Timeline

1
Patch available
Dec 02, 2026 - 08:01 EUVD

DescriptionCVE.org

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

Threat Intelligence Overview

EPSS Score
0.6%
Top 52% exploitable
Prevalence
Medium
popular Spring library, but only in Java apps using MongoDB
Data Quality
4 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.6%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

33
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +32
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

More in Spring

View all
CVE-2025-70982 CRITICAL POC
9.9 Jan 26

Access control bypass in SpringBlade v4.5.0 importUser function allows low-privileged users to import sensitive user dat

CVE-2026-59367 CRITICAL POC
9.4 Dec 02

EmbeddedLdapServer in the spring-ldap-test artifact, Spring LDAP's test fixture, listens on every network interface of i

CVE-2026-59417 CRITICAL POC
9.1 Dec 02

Cross-user information disclosure and cache poisoning affect Spring AI's spring-ai-redis-semantic-cache module when a si

CVE-2026-22739 HIGH POC
8.6 Mar 24

Spring Cloud Config Server contains a path traversal vulnerability when using the native file system backend, allowing u

CVE-2025-41242 MEDIUM POC
5.9 Aug 18

Spring Framework MVC applications can be vulnerable to a “Path Traversal Vulnerability” when deployed on a non-compliant

CVE-2025-70983 CRITICAL
9.9 Jan 23

SpringBlade v4.5.0 has an access control flaw in authRoutes allowing low-privileged users to escalate to admin through t

CVE-2026-41699 CRITICAL
9.8 Jun 11

Remote code execution in Spring for GraphQL versions 1.3.0-1.3.8, 1.4.0-1.4.5, and 2.0.0-2.0.3 allows unauthenticated at

CVE-2026-59313 CRITICAL
9.8 Aug 27

Server-Sent Events (SSE) stream corruption affects Spring MVC applications built on the functional web framework across

CVE-2026-22738 CRITICAL
9.8 Mar 27

Spring AI versions 1.0.0 through 1.0.4 and 1.1.0 through 1.1.3 allow unauthenticated remote code execution through Sprin

CVE-2026-41855 CRITICAL
9.8 Jun 09

Unsafe JSON deserialization in Spring Framework's JMS message converters (MappingJackson2MessageConverter and JacksonJso

CVE-2026-59414 CRITICAL
9.1 Dec 02

Spring Boot can leave protected Actuator or static-resource paths reachable to unauthenticated remote requests when a tr

CVE-2026-59411 CRITICAL
9.1 Dec 02

Spring Boot Actuator endpoints in Servlet-based Spring Boot web applications deployed to Cloud Foundry can become remote

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy