Improper Neutralization of Special Elements in Data Query Logic Affecting mongodb/mongodb package, versions <1.21.4>=2.0.0, <2.4.1


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.49% (40th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-PHP-MONGODBMONGODB-20186912
  • published28 Sept 2026
  • disclosed8 Sept 2026
  • creditUnknown

Introduced: 8 Sep 2026

NewCVE-2026-81525  (opens in a new tab)
CWE-943  (opens in a new tab)

How to fix?

Upgrade mongodb/mongodb to version 1.21.4, 2.4.1 or higher.

Overview

Affected versions of this package are vulnerable to Improper Neutralization of Special Elements in Data Query Logic via improper validation of database and collection names. An attacker can access or manipulate unintended databases or collections by supplying input containing prohibited characters such as "." or NUL bytes.

Workaround

This vulnerability can be mitigated by validating database and collection names prior to passing them into APIs.

CVSS Base Scores

version 4.0
version 3.1