CVE-2026-41696: Spring Data MongoDB Regex Parameter Binding Injection Vulnerability

Summary

10/06/2026
Yes i
Moderate
5.9

CVE-2026-41696: Spring Data MongoDB Has Regex Parameter Binding Injection in @Query Repository Methods. Affects org.springframework.data:spring-data-mongodb across 5 version ranges.

< 3.4.19 >= 4.0.0, <= 4.3.16 >= 4.4.0, <= 4.4.14 >= 4.5.0, < 4.5.12 >= 5.0.0, < 5.0.6

Fixed in 3.4.19, 4.5.12 or 5.0.6, depending on the release line you run. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

Spring Data MongoDB is a powerful framework that simplifies the integration of MongoDB with Spring applications. It provides a repository abstraction for data access, allowing developers to perform CRUD operations easily. However, certain versions of this package are vulnerable to regex parameter binding injection, which can lead to unintended query execution and data exposure.

Vulnerability Detail

The vulnerability arises from insufficient validation of bound parameters in repository query methods annotated with @Query. An attacker can exploit this weakness by supplying a specially crafted string that breaks out of the intended regular expression quoting. This can lead to unauthorized access to data or manipulation of queries, posing a significant security risk.

How To Fix

Latest published version: 5.2.0-RC1 as of 23 Oct 2026

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • < 3.4.19 3.4.19
  • >= 4.5.0, < 4.5.12 4.5.12
  • >= 5.0.0, < 5.0.6 5.0.6

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

As a temporary measure, avoid using regex parameter binding in @Query methods until the package is updated. Instead, consider using alternative query methods that do not involve regex or validate the input thoroughly before passing it to the query.

Conclusion

The Spring Data MongoDB regex parameter binding injection vulnerability (CVE-2026-41696) poses a significant risk to applications using affected versions. It is crucial to update to the patched versions to mitigate this risk and ensure the security of your application.

See every vulnerability recorded for org.springframework.data:spring-data-mongodb →

Share this vulnerability

FAQ

CVE-2026-41696 is a vulnerability in Spring Data MongoDB that allows for regex parameter binding injection due to insufficient validation of input parameters.

Affected versions include Spring Data MongoDB 5.0.0 through 5.0.5, 4.5.0 through 4.5.11, and several others down to 3.4.0.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software by analyzing the pom.xml file. You can also check your application at the Vulert playground without signup.

The CVSS score for this vulnerability is 5.9, indicating a moderate severity level.

If immediate updates are not possible, avoid using regex parameter binding in your queries and validate all inputs thoroughly.

Related vulnerabilities

Recent vulnerabilities recorded for org.springframework.data:spring-data-mongodb.

How To Fix

Latest published version: 5.2.0-RC1 as of 23 Oct 2026

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • < 3.4.19 3.4.19
  • >= 4.5.0, < 4.5.12 4.5.12
  • >= 5.0.0, < 5.0.6 5.0.6

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback