Security Vulnerability Report
中文
CVE-2026-5170 CVSS 5.3 MEDIUM

CVE-2026-5170

Published: 2026-03-30 16:16:11
Last Modified: 2026-04-02 17:18:58

Description

A user with access to the cluster with a limited set of privilege actions can trigger a crash of a mongod process during the limited and unpredictable window when the cluster is being promoted from a replica set to a sharded cluster. This may cause a denial of service by taking down the primary of the replica set. This issue affects MongoDB Server v8.2 versions prior to 8.2.2, MongoDB Server v8.0 versions between 8.0.18, MongoDB Server v7.0 versions between 7.0.31.

CVSS Details

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

Configurations (Affected Products)

cpe:2.3:a:mongodb:mongodb:*:*:*:*:-:*:*:* - VULNERABLE
cpe:2.3:a:mongodb:mongodb:*:*:*:*:-:*:*:* - VULNERABLE
cpe:2.3:a:mongodb:mongodb:*:*:*:*:-:*:*:* - VULNERABLE
MongoDB Server v8.2 < 8.2.2
MongoDB Server v8.0 (受影响版本范围包含 8.0.18)
MongoDB Server v7.0 (受影响版本范围包含 7.0.31)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import pymongo import time import sys # PoC for CVE-2026-5170 # This script demonstrates the theoretical attack scenario where a low-privilege user # triggers a crash during the promotion window. TARGET_HOST = "mongodb://localhost:27017" USERNAME = "limited_user" PASSWORD = "password" def trigger_crash(): try: client = pymongo.MongoClient(TARGET_HOST, username=USERNAME, password=PASSWORD) db = client["admin"] print("[+] Connected to MongoDB target.") print("[!] Waiting for cluster promotion window (Replica Set -> Sharded Cluster)...") # In a real scenario, the attacker monitors the cluster state. # When the promotion starts, the attacker sends specific commands. # Since the exact command is not disclosed, we simulate a rapid command execution. for i in range(100): # Simulating operation that might conflict with promotion state try: # Hypothetical command that triggers the race condition db.command('replSetGetStatus') db.command('ping') except Exception as e: print(f"Command failed (expected during crash): {e}") break time.sleep(0.1) print("[+] Attempting to trigger vulnerability during promotion...") except Exception as e: print(f"[-] Error: {e}") if __name__ == "__main__": trigger_crash()

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-5170", "sourceIdentifier": "[email protected]", "published": "2026-03-30T16:16:10.610", "lastModified": "2026-04-02T17:18:58.177", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "A user with access to the cluster with a limited set of privilege actions can trigger a crash of a mongod process during the limited and unpredictable window when the cluster is being promoted from a replica set to a sharded cluster. This may cause a denial of service by taking down the primary of the replica set.\n\nThis issue affects MongoDB Server v8.2 versions prior to 8.2.2, MongoDB Server v8.0 versions between 8.0.18, MongoDB Server v7.0 versions between 7.0.31."}, {"lang": "es", "value": "Un usuario con acceso al clúster con un conjunto limitado de acciones de privilegio puede desencadenar una caída de un proceso mongod durante la ventana limitada e impredecible cuando el clúster está siendo promovido de un conjunto de réplicas a un clúster fragmentado. Esto puede causar una denegación de servicio al derribar el primario del conjunto de réplicas.\n\nEste problema afecta a MongoDB Server v8.2 versiones anteriores a 8.2.2, MongoDB Server v8.0 versiones entre 8.0.18, MongoDB Server v7.0 versiones entre 7.0.31."}], "metrics": {"cvssMetricV40": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "4.0", "vectorString": "CVSS:4.0/AV:N/AC:H/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": 6.0, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "HIGH", "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:H/PR:L/UI:N/S:U/C:N/I:N/A:H", "baseScore": 5.3, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "HIGH", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.6, "impactScore": 3.6}, {"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H", "baseScore": 5.3, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "HIGH", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.6, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-617"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:mongodb:mongodb:*:*:*:*:-:*:*:*", "versionStartIncluding": "7.0.0", "versionEndExcluding": "7.0.31", "matchCriteriaId": "20BB1767-F789-4A09-BB6F-00B535AEDC02"}, {"vulnerable": true, "criteria": "cpe:2.3:a:mongodb:mongodb:*:*:*:*:-:*:*:*", "versionStartIncluding": "8.0.0", "versionEndExcluding": "8.0.18", "matchCriteriaId": "EAD79FD4-B8A1-463B-A796-BCA50C8A0020"}, {"vulnerable": true, "criteria": "cpe:2.3:a:mongodb:mongodb:*:*:*:*:-:*:*:*", "versionStartIncluding": "8.2.0", "versionEndExcluding": "8.2.2", "matchCriteriaId": "8CDDADB5-3620-4C02-8161-94B36072C363"}]}]}], "references": [{"url": "https://jira.mongodb.org/browse/SERVER-101758", "source": "[email protected]", "tags": ["Patch", "Vendor Advisory"]}]}}