CVE-2026-81525: Cross-tenant database retargeting via dot/NUL injection in namespace strings in the PHP Driver

Published Aug 27, 2026
·
Updated

Impact Passing untrusted input as part of a database or collection name may result in targeting a different database or collection than specified.

Patches Fixed in PHP library 1.21.4 and 2.4.1.

Workarounds Validate database and collection names prior to passing into APIs.

Other sources

The MongoDB client library for PHP does not sufficiently sanitize special elements in application-supplied namespace identifiers before using them to construct the target namespace for database operations. An application that incorporates untrusted text into these identifiers may have operations silently directed at a different storage location than the one the application intended.

— MITRE

Affected Software

3 affected componentsFixes available
MongoDB PHP Driver
composer/mongodb/mongodb>=2.0.0<2.4.1
2.4.1
composer/mongodb/mongodb<1.21.4
1.21.4

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade composer/mongodb/mongodb to a version that resolves this vulnerability.

    Fixed in 2.4.1
  2. Upgrade

    Upgrade composer/mongodb/mongodb to a version that resolves this vulnerability.

    Fixed in 1.21.4
  3. Upgrade

    Upgrade MongoDB client library for PHP to a version that resolves this vulnerability.

    Fixed in 1.21.4
  4. Upgrade

    Upgrade MongoDB client library for PHP to a version that resolves this vulnerability.

    Fixed in 2.4.1
  5. Compensating control

    Validate database and collection names prior to passing them into the MongoDB client library for PHP APIs, to avoid dot/NUL injection via untrusted namespace identifiers that can silently retarget operations to a different storage location.

Event History

Aug 27, 2026
CVE Published
via MITRE·06:32 PM
Data Sourced
via MITRE·06:32 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·08:18 PM
DescriptionSeverityWeakness
Sep 8, 2026
Advisory Published
via GitHub·09:27 PM
Data Sourced
via GitHub·09:27 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What conditions are required for exploitation?

An attacker needs network access and low-level privileges, with no user interaction required. The application must incorporate attacker-controlled text into namespace identifiers used by the PHP client library.

2

What is the practical impact for affected applications?

Database operations may be silently redirected to a storage location other than the one intended by the application. This can result in high-impact confidentiality and integrity consequences, while no availability impact is indicated.

3

How can I identify applications that may be exposed?

Review PHP applications using the MongoDB PHP Driver or MongoDB PHP library for code that builds database or collection namespace identifiers from request data or other untrusted input. Pay particular attention to namespace values that are not strictly validated before being passed to database operations.

4

What release information is available for remediation planning?

The provided references include MongoDB PHP Library release 2.4.1 and MongoDB PHP Driver release 1.21.7. Compare deployed components with those release references and review the associated release information before updating.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203