Spring Data MongoDB String query logic injection via function operator bind parameter
- Exploited
- No known exploitation
- Fix
- Fixed in 5.1.2.1, 5.0.8.1, 4.5.15, 4.4.17, 3.4.22, and 2 more
- Who is exposed
- Not reported
Summary
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 , ...)
What to do
Upgrade to a fixed version: 5.1.2.1, 5.0.8.1, 4.5.15, 4.4.17, 3.4.22, or one of 2 more.
Check your systems with an agent
Paste this into a coding or ops agent. It checks your systems read-only and reports a table per asset.
Check whether my systems are affected by CVE-2026-59342 (Spring Data MongoDB String query logic injection via function operator bind parameter), using the cve.now data below.
Rules: work read-only. Do not run exploit code, proof-of-concept scripts or scanners that send attack payloads, and do not change any configuration, package, image or deployment. Report findings only.
What cve.now has for CVE-2026-59342 (entry last updated 2026-12-02):
Affected:
- Spring Spring Data MongoDB: from 5.1.0, fixed in 5.1.2.1; from 5.0.0, fixed in 5.0.8.1; from 4.5.0, fixed in 4.5.15; from 4.4.0, fixed in 4.4.17; fixed in 3.4.22; from 5.1.0, fixed in 5.1.3; from 5.0.0, fixed in 5.0.9
Fixed versions: 5.1.2.1, 5.0.8.1, 4.5.15, 4.4.17, 3.4.22, 5.1.3, 5.0.9.
Setup: unknown whether the bug needs a non-default feature or setting. Check the advisory.
CISA KEV: CVE-2026-59342 is not listed as of cve.now's last read.
This KEV status is for CVE-2026-59342 only. If you also check another CVE, look up its own KEV status; never assume it from this one.
How to check:
- Installed software: check what is actually running, not what a repo declares. Read the version from each host, container image and Kubernetes node (the binary's version output, the OS package database, image layers), and check whether the conditions above hold there. Distribution packages may carry a backported fix under an older version number; confirm against the distribution's own advisory.
Verify against the linked advisories before concluding, and cite the date you read each one:
- https://spring.io/security/cve-2026-59342
- https://nvd.nist.gov/vuln-metrics/cvss/v3-calculator?vector=AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:L&version=3.1
Do not conclude an asset is unaffected unless you checked it and the evidence covers both its version and the conditions above. If you could not check something, mark it unknown and say what is missing.
Report a table with one row per asset and these columns: Asset | Version or build | Status (affected, fixed, not applicable, unknown) | Compensating controls | Exposure (internet-facing, internal, none) | Evidence | Next action.
Entry: https://cve.now/CVE-2026-59342
For follow-up questions, use the cve.now MCP server at https://mcp.cve.now/mcp (no authentication), for example execute with name cve.get and arguments {"id": "CVE-2026-59342"}.Affected versions
- Spring Spring Data MongoDBFrom 5.1.0 · fixed in 5.1.2.1; From 5.0.0 · fixed in 5.0.8.1; From 4.5.0 · fixed in 4.5.15; From 4.4.0 · fixed in 4.4.17; fixed in 3.4.22; From 5.1.0 · fixed in 5.1.3; From 5.0.0 · fixed in 5.0.9
cve.now Index
- Exploitation?/40Unknown. No CISA SSVC exploitation rating yet
- Exposure17/25No login or user action needed per the CVSS vector, reachable over the network without a login · Unknown: No advisory context yet
- Reach?/20Unknown. No tracked technology or package matched
- Severity6.5/10CVSS 6.5
- No patch0/5No signal
What would change the score
- Would score about 69 if added to CISA KEV
- Would score about 64 if CISA's SSVC rates exploitation active
- Would score about 29 if advisories confirm default setups are exposed
Timeline
- CVE published
- First seen by cve.now
Evidence 4
| Kind | Source |
|---|---|
| Vendor advisory 1Establishes: Affected and fixed versions. | |
| Link | spring.io · security/cve-2026-59342 |
| CVE record 3Establishes: The identifier and description. | |
| Record | CVE List · CVE-2026-59342 |
| Record | NVD · CVE-2026-59342 |
| Link | nvd.nist.gov · vuln-metrics/cvss/v3-calculator?vector=AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:L&version=3.1 |
Questions about CVE-2026-59342
Is CVE-2026-59342 being exploited?
It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.
Source: cve.now feed data
Which versions are affected by CVE-2026-59342?
Spring Data MongoDB: from 5.1.0 before 5.1.2.1; from 5.0.0 before 5.0.8.1; from 4.5.0 before 4.5.15; from 4.4.0 before 4.4.17; before 3.4.22; from 5.1.0 before 5.1.3; from 5.0.0 before 5.0.9.
Source: cve.now feed data
How do I fix CVE-2026-59342?
Upgrade to a fixed version: 5.1.2.1, 5.0.8.1, 4.5.15, 4.4.17, 3.4.22, or one of 2 more.
Source: cve.now feed data
Related
- CVE-2026-41717Spring Data MongoDB - SpEL Expression Injection via Annotated Query Parameter Binding
- CVE-2026-41696Spring Data MongoDB Bind Parameter Literal Quoting Breakout
- CVE-2026-59444Spring Integration Redis Queue Unsafe Java Deserialization
- CVE-2026-59435Spring Cloud Config Server Leaks Backend Git and SVN Credentials via Property Source Names
- CVE-2026-59433Spring Cloud Netflix Eureka Server Credential Leakage via Dashboard
- CVE-2026-59427Spring Cloud Gateway LocalResponseCache Stores private and no-store Responses, Leaking Authenticated Content
No corrections so far. Something wrong on this page? Report an error.