HIGH 8.8

CVE-2026-11933: MongoDB Server Use-After-Free in JavaScript Engine (CVSS 8.8)

MongoDB Server contains a use-after-free vulnerability in its server-side JavaScript engine when processing BSON documents. An authenticated user with read access who can execute server-side JavaScript code—through operators like $where or $function—can trigger the server to read memory that has already been freed. This can leak sensitive data from the mongod process or crash the server entirely.

Source data · NVD / CISA · public domain

CVSS
3.1 · 8.8 HIGH · CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Weaknesses (CWE)
CWE-416, CWE-787
Affected products
1 configuration(s)
Published / Modified
2026-06-12 / 2026-06-22

NVD description (verbatim)

A use-after-free vulnerability exists in MongoDB Server's server-side JavaScript engine when converting BSON documents to JavaScript arrays. An authenticated user with read privileges who is able to run server-side JavaScript (for example, via $where or $function) can cause the server to access memory that has already been freed. This may result in disclosure of information from the mongod process memory or a denial of service through a server crash.

1 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

The vulnerability (CWE-416: Use-After-Free, CWE-787: Out-of-bounds Write) occurs during BSON-to-JavaScript array conversion in MongoDB's server-side JavaScript execution context. When an authenticated user with read privileges invokes server-side JavaScript functionality, a memory management error allows dereferencing of freed memory. This memory safety violation can result in unauthorized information disclosure from the mongod process address space or denial of service via unhandled memory access exceptions.

Business impact

Organizations relying on MongoDB Server face two primary operational risks. First, attackers with database read credentials could exfiltrate sensitive data residing in server process memory, potentially including encryption keys, authentication tokens, or business-critical information. Second, malicious or inadvertent JavaScript execution could destabilize production databases, triggering unexpected crashes and service interruption. The authentication requirement moderates the threat surface but does not eliminate it for multi-tenant deployments or scenarios where application-layer read access controls are permissive.

Affected systems

MongoDB Server versions are affected. Organizations must verify their specific deployment versions against the vendor advisory to determine exposure. This applies to any MongoDB instance permitting server-side JavaScript execution via $where, $function, or similar operators.

Exploitability

Exploitation requires an authenticated account with read privileges and the ability to execute server-side JavaScript. The CVSS vector (AC:L) indicates low attack complexity once authentication is obtained, meaning standard JavaScript syntax is sufficient to trigger the flaw. The attack does not require user interaction and operates over the network. However, the prerequisite authentication requirement prevents unauthenticated remote exploitation.

Remediation

Apply the patch released by MongoDB. Consult the vendor advisory for specific version numbers and upgrade procedures. Organizations unable to patch immediately should implement network segmentation to restrict MongoDB access to trusted application servers, disable or restrict server-side JavaScript execution where operationally feasible, and monitor for suspicious JavaScript invocations in audit logs.

Patch guidance

Contact MongoDB for the patched version applicable to your deployment. The typical remediation path involves upgrading to a fixed release. Before patching, test in a non-production environment to ensure compatibility with your applications and operational workflows. Document the upgrade process for audit and compliance purposes.

Detection guidance

Monitor mongod logs for $where, $function, $mapReduce, and other server-side JavaScript invocations, especially from unexpected users or applications. Flag repeated failures or timeouts in JavaScript execution contexts, which may indicate attack attempts. Use database activity monitoring (DAM) tools to correlate JavaScript execution with subsequent memory-related errors or process crashes. Anomalous memory access patterns or unexpected server crashes after JavaScript operations should trigger investigation.

Why prioritize this

This vulnerability merits high priority due to its CVSS score of 8.8 (HIGH severity), which reflects broad impact potential (confidentiality, integrity, and availability). While authentication is required, the low attack complexity and high-consequence outcomes (data disclosure or service disruption) make this a significant risk for MongoDB deployments in production environments. Organizations should prioritize patching within their standard vulnerability management timelines, with acceleration for systems handling sensitive data or supporting critical business operations.

Risk score, explained

The CVSS 3.1 score of 8.8 reflects (1) network-accessible attack surface (AV:N), (2) low complexity once authenticated (AC:L), (3) authentication requirement (PR:L), (4) no user interaction needed (UI:N), (5) scope unchanged (S:U), and (6) full impact across confidentiality, integrity, and availability (C:H/I:H/A:H). The use-after-free flaw can corrupt or leak process memory with no defense mechanisms within the normal execution context, justifying the high severity rating.

Frequently asked questions

Who is at risk from this vulnerability?

MongoDB administrators and organizations running MongoDB Server with users or applications that can invoke server-side JavaScript functions. Multi-tenant deployments and systems where application read access is broadly granted face elevated risk. Standalone deployments with tightly controlled authentication are lower risk but still require patching.

Can this be exploited without a MongoDB account?

No. Exploitation requires an authenticated account with read privileges. This authentication requirement prevents anonymous remote attacks but does not eliminate risk in environments where read access is permissive or shared credentials are common.

What is the difference between memory disclosure and denial of service outcomes?

Memory disclosure (confidentiality breach) can reveal plaintext credentials, encryption keys, or business data stored in the mongod process memory. Denial of service (availability impact) manifests as server crashes or hangs that disrupt application availability. Both outcomes are possible depending on how the vulnerability is triggered and the underlying memory layout.

Are there compensating controls if patching is delayed?

Yes. Restrict network access to MongoDB to trusted application servers via firewall rules. Disable server-side JavaScript execution entirely if your workloads do not require $where, $function, or $mapReduce. Monitor database audit logs for JavaScript operations and unusual access patterns. These controls reduce but do not eliminate risk; patching is the definitive remedy.

This analysis is based on publicly disclosed vulnerability information as of the publication date. CVSS scores, affected versions, and patch availability are subject to change. Organizations must independently verify all patch versions, compatibility notes, and deployment guidance against official MongoDB vendor advisories. SEC.co makes no warranty regarding the accuracy or completeness of remediation timelines or technical details. Always test patches in non-production environments before deploying to production systems. Consult with your security team and vendor support for guidance specific to your infrastructure and compliance requirements. Source: NVD (public-domain), retrieved 2026-07-20. Analysis generated by SEC.co (claude-haiku-4-5).