Description
Spring Data MongoDB contains a SpEL (Spring Expression Language) expression injection vulnerability. The issue occurs during parameter binding when a user-defined repository query method is annotated with @Query and utilizes a capture-all placeholder.

Affected versions:
Spring Data MongoDB 5.0.0 through 5.0.5; 4.5.0 through 4.5.11; 4.4.0 through 4.4.14; 4.3.0 through 4.3.16; 4.2.0 through 4.2.15; 4.1.0 through 4.1.14; 4.0.0 through 4.0.15; 3.4.0 through 3.4.19.
Published: 2026-06-09
Score: 8.1 High
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Spring Data MongoDB contains an injection flaw that allows a malicious actor to embed Spring Expression Language (SpEL) payloads into annotated query parameters. The issue is triggered when a repository method annotated with @Query uses a capture‑all placeholder for user input. An attacker can supply a crafted value that evaluates to arbitrary code or commands during query construction, compromising confidentiality, integrity, and potentially availability of the target application. The weakness is categorized as CWE‑917, an expression injection vulnerability.

Affected Systems

The flaw affects all versions of Spring Data MongoDB from 3.4.0 through 5.0.5, including the sub‑series 4.0.x, 4.1.x, 4.2.x, 4.3.x, 4.4.x, 4.5.x, and 5.0.x. Any deployment that relies on Spring’s repository query methods with @Query and user‑supplied placeholders is vulnerable.

Risk and Exploitability

The CVSS score of 8.1 indicates a high severity with a potential for remote code execution when the vulnerable query is executed in a context with application privileges. While the EPSS score is not available, the lack of a KEV listing suggests no mass exploitation has been observed yet, but the risk remains significant for systems exposed to untrusted input. The likely attack vector is the application layer, where developers or data providers supply query parameters that are not properly sanitized, leading to successful expression injection.

Generated by OpenCVE AI on June 10, 2026 at 01:25 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Spring Data MongoDB to the latest available release (5.0.6 or newer) or any public patch that addresses the SpEL injection flaw.
  • If an upgrade cannot be performed immediately, remove or refactor all repository methods that use @Query with capture‑all placeholders, replacing them with parameter binding that does not expose expression evaluation.
  • Implement strict input validation or sanitization on all query parameters before they are passed to the repository layer to prevent accidental SpEL execution.

Generated by OpenCVE AI on June 10, 2026 at 01:25 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

References
History

Wed, 10 Jun 2026 00:00:00 +0000

Type Values Removed Values Added
Description Spring Data MongoDB contains a SpEL (Spring Expression Language) expression injection vulnerability. The issue occurs during parameter binding when a user-defined repository query method is annotated with @Query and utilizes a capture-all placeholder. Affected versions: Spring Data MongoDB 5.0.0 through 5.0.5; 4.5.0 through 4.5.11; 4.4.0 through 4.4.14; 4.3.0 through 4.3.16; 4.2.0 through 4.2.15; 4.1.0 through 4.1.14; 4.0.0 through 4.0.15; 3.4.0 through 3.4.19.
Title Spring Data MongoDB - SpEL Expression Injection via Annotated Query Parameter Binding
Weaknesses CWE-917
References
Metrics cvssV3_1

{'score': 8.1, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: vmware

Published:

Updated: 2026-06-09T23:48:38.290Z

Reserved: 2026-04-22T06:21:37.020Z

Link: CVE-2026-41717

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-06-10T00:16:51.683

Modified: 2026-06-10T00:16:51.683

Link: CVE-2026-41717

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-06-10T01:30:18Z

Weaknesses