CVE-2026-13077
MongoDB vulnerability analysis and mitigation

Overview

CVE-2026-13077 is an out-of-bounds heap read vulnerability in MongoDB Server's BSON CodeWScope element accessors that allows an authenticated attacker to trigger a server crash or disclose adjacent heap memory contents via a crafted aggregation pipeline. It was published on July 22, 2026, and affects MongoDB Server versions 7.0.x before 7.0.39, 8.0.x before 8.0.28, 8.2.x before 8.2.12, and 8.3.x before 8.3.7. The vulnerability carries a CVSS v3.1 base score of 7.1 (High) and a CVSS v4.0 base score of 7.1 (High) (GitHub Advisory).

Technical details

The root cause is a missing bounds check (CWE-125: Out-of-bounds Read) in the BSON CodeWScope element accessors within MongoDB's BSONColumn decompression logic. An authenticated attacker can craft malformed BSONColumn data containing a CodeWScope element that bypasses wire-level BSON validation; when the server decompresses this forged element, an unchecked size value is used in pointer arithmetic, resulting in a heap out-of-bounds read. The attack vector is network-based, requires low privileges (authenticated access), no user interaction, and low attack complexity (GitHub Advisory, MongoDB Jira).

Impact

Successful exploitation can result in two distinct outcomes: a denial-of-service condition via server crash, or disclosure of adjacent heap memory contents, which may expose sensitive in-memory data such as query results, credentials, or other database contents. The high availability impact combined with low confidentiality impact makes this vulnerability particularly disruptive to database operations. There is no integrity impact, and lateral movement potential is limited, but heap memory disclosure could facilitate further attacks (GitHub Advisory).

Exploitation steps

  1. Obtain authenticated access: Acquire valid MongoDB credentials (e.g., through credential theft, brute force, or a low-privilege account) to connect to a vulnerable MongoDB Server instance (versions 7.0.x < 7.0.39, 8.0.x < 8.0.28, 8.2.x < 8.2.12, or 8.3.x < 8.3.7).
  2. Craft malformed BSONColumn data: Construct a malformed BSONColumn binary payload containing a CodeWScope element with a manipulated (unchecked) size value that will bypass wire-level BSON validation upon receipt by the server.
  3. Embed payload in aggregation pipeline: Wrap the crafted BSONColumn data within a MongoDB aggregation pipeline query designed to trigger decompression of the malformed element on the server side.
  4. Submit the pipeline: Send the crafted aggregation pipeline to the target MongoDB instance using the MongoDB wire protocol (default port 27017).
  5. Trigger out-of-bounds read: The server decompresses the BSONColumn data; the unchecked size value is used in pointer arithmetic, causing an out-of-bounds heap read that either crashes the server (DoS) or returns adjacent heap memory contents to the attacker (GitHub Advisory, MongoDB Jira).

Indicators of compromise

  • Network: Unusual or malformed aggregation pipeline queries arriving on MongoDB port (default 27017) from authenticated sessions; repeated connection attempts followed by server restarts.
  • Logs: MongoDB server logs (mongod.log) showing unexpected crashes, segmentation faults, or memory access errors during aggregation pipeline execution; log entries referencing BSONColumn decompression failures or CodeWScope element processing.
  • Process: Unexpected mongod process termination or restart events; core dump files generated in the MongoDB working directory following a crash.
  • File System: Presence of core dump files (e.g., core, core.mongod.*) in the MongoDB data or working directory, indicating a server crash triggered by the exploit.

Mitigation and workarounds

MongoDB has released patched versions addressing this vulnerability: upgrade to MongoDB Server 7.0.39, 8.0.28, 8.2.12, or 8.3.7 as appropriate for your release track (GitHub Advisory, MongoDB Jira). As interim mitigations, restrict network access to MongoDB instances to trusted clients only using firewall rules or network segmentation, and enforce the principle of least privilege for database accounts to limit who can submit aggregation pipelines. Implement monitoring for unexpected server crashes or memory access errors to detect potential exploitation attempts.

Additional resources


SourceThis report was generated using AI

Related MongoDB vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-9737HIGH7.1
  • MongoDB logoMongoDB
  • cpe:2.3:a:mongodb:mongodb
NoYesJul 22, 2026
CVE-2026-13077HIGH7.1
  • MongoDB logoMongoDB
  • cpe:2.3:a:mongodb:mongodb
NoYesJul 22, 2026
CVE-2026-13076HIGH7.1
  • MongoDB logoMongoDB
  • cpe:2.3:a:mongodb:mongodb
NoYesJul 22, 2026
CVE-2026-13075HIGH7.1
  • MongoDB logoMongoDB
  • cpe:2.3:a:mongodb:mongodb
NoYesJul 22, 2026
CVE-2026-13078MEDIUM6.3
  • MongoDB logoMongoDB
  • cpe:2.3:a:mongodb:mongodb
NoYesJul 22, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management