CVE-2026-18696 Overview
CVE-2026-18696 is an authorization bypass vulnerability in MongoDB Server's applyOps command. An authenticated user holding specific non-default privileges can perform data-definition operations, such as dropping or modifying collections, against collections they lack permission to manipulate. The flaw stems from an inconsistency between the collection targeted by the authorization check and the collection acted upon by the actual operation. This mismatch enables an attacker with limited access to alter or destroy database objects outside their authorized scope, categorized under [CWE-863] Incorrect Authorization.
Critical Impact
An authenticated user with narrow, non-default privileges can drop or modify MongoDB collections outside their permitted scope, resulting in loss of data integrity and availability.
Affected Products
- MongoDB Server (versions specified in the vendor issue tracker entry SERVER-130139)
- Deployments exposing the applyOps command to authenticated users
- Environments granting non-default privilege combinations that include applyOps rights
Discovery Timeline
- 2026-08-11 - CVE-2026-18696 published to NVD
- 2026-08-11 - Last updated in NVD database
Technical Details for CVE-2026-18696
Vulnerability Analysis
The applyOps command in MongoDB Server executes an ordered list of low-level operations, including data-definition statements such as drop, create, and renameCollection. MongoDB enforces authorization by checking whether the caller holds the required privileges on the collection identified in each nested operation. The vulnerability arises because the collection resolved during the authorization check differs from the collection resolved during execution. An authenticated user with specific non-default privileges can craft an applyOps payload that passes the authorization check against a collection they control, then executes against a different collection they do not have permission to manipulate.
The outcome is unauthorized modification or deletion of collections belonging to other tenants, applications, or administrative domains within the same MongoDB deployment. Confidentiality is unaffected, but integrity and availability of targeted collections are directly impacted.
Root Cause
The root cause is an inconsistency in the collection-namespace resolution logic between MongoDB's authorization layer and its command executor. The authorization check inspects one namespace derived from the request, while the operation later resolves and acts on a different namespace. This TOCTOU-style logic gap violates the principle that authorization decisions must bind to the exact resource used during execution.
Attack Vector
The attack requires network access to the MongoDB Server and valid authenticated credentials holding non-default privileges that permit invocation of applyOps. The attacker submits a crafted applyOps payload whose nested data-definition operation references a collection outside the caller's permitted scope. Because the authorization check resolves a different namespace than the execution path, MongoDB permits the operation and applies destructive changes to the unauthorized collection.
No user interaction is required. Refer to the MongoDB Issue Tracker Update for vendor-provided technical details.
Detection Methods for CVE-2026-18696
Indicators of Compromise
- Unexpected dropCollection, renameCollection, or create entries in the MongoDB audit log originating from users lacking direct privileges on the affected namespace.
- applyOps command invocations in the operation profiler where the nested operation namespace differs from the caller's typical working set.
- Sudden disappearance or schema changes of collections without corresponding administrative change tickets.
Detection Strategies
- Enable MongoDB auditing and filter for applyOps events, correlating the executing user with the namespace of each nested operation.
- Alert when data-definition operations (drop, create, renameCollection) execute inside applyOps payloads submitted by non-administrative accounts.
- Compare privilege grants against the actual namespaces touched by each applyOps invocation to surface mismatches.
Monitoring Recommendations
- Ship MongoDB audit logs to a centralized analytics platform and retain them for post-incident review.
- Baseline normal applyOps usage per service account; alert on deviation in command frequency or target namespace.
- Monitor for privilege escalation patterns following any confirmed unauthorized collection change.
How to Mitigate CVE-2026-18696
Immediate Actions Required
- Upgrade MongoDB Server to the fixed release documented in the vendor tracker entry SERVER-130139.
- Audit all custom roles and revoke any grant of applyOps privileges that is not strictly required for operational tooling.
- Rotate credentials for any account observed invoking applyOps against unexpected namespaces.
Patch Information
MongoDB has tracked the fix under the internal issue SERVER-130139. Consult the linked issue for the list of patched server versions and apply the vendor-supplied update to all replica set members and shards. Restart affected mongod processes following the rolling upgrade procedure documented by MongoDB.
Workarounds
- Restrict the applyOps privilege to trusted administrative accounts and remove it from application service roles.
- Enforce least-privilege by scoping database and collection grants explicitly rather than through wildcard resources.
- Isolate multi-tenant workloads into separate MongoDB deployments where the blast radius of an authorization flaw is bounded.
# Configuration example: review roles that expose applyOps
mongosh --eval 'db.getSiblingDB("admin").system.roles.find({"privileges.actions":"applyOps"}).pretty()'
# Revoke applyOps from a custom role
mongosh --eval 'db.getSiblingDB("admin").runCommand({revokePrivilegesFromRole:"appRole",privileges:[{resource:{cluster:true},actions:["applyOps"]}]})'
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

