Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSubmit crafted string to repository query parameter
-
DeliveryEscape quoted JavaScript string literal
-
ExploitInject server-side JavaScript into script expression
-
ExecutionExecute injected JS in MongoDB engine
-
ImpactExfiltrate 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. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
Affected Packages
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
AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:L
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).
Primary rating from Vendor (vmware).
CVSS VectorVendor: vmware
Lifecycle Timeline
1DescriptionCVE.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
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
Access control bypass in SpringBlade v4.5.0 importUser function allows low-privileged users to import sensitive user dat
EmbeddedLdapServer in the spring-ldap-test artifact, Spring LDAP's test fixture, listens on every network interface of i
Cross-user information disclosure and cache poisoning affect Spring AI's spring-ai-redis-semantic-cache module when a si
Spring Cloud Config Server contains a path traversal vulnerability when using the native file system backend, allowing u
Spring Framework MVC applications can be vulnerable to a “Path Traversal Vulnerability” when deployed on a non-compliant
SpringBlade v4.5.0 has an access control flaw in authRoutes allowing low-privileged users to escalate to admin through t
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
Server-Sent Events (SSE) stream corruption affects Spring MVC applications built on the functional web framework across
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
Unsafe JSON deserialization in Spring Framework's JMS message converters (MappingJackson2MessageConverter and JacksonJso
Spring Boot can leave protected Actuator or static-resource paths reachable to unauthenticated remote requests when a tr
Spring Boot Actuator endpoints in Servlet-based Spring Boot web applications deployed to Cloud Foundry can become remote
EUVD-2026-141027
GHSA-v3m3-42wv-v9hm
NVD
CVE.org
EPSS
Exploit-DB