CVE-2026-9751
MongoDB vulnerability analysis and mitigation

Overview

CVE-2026-9751 is a credential disclosure vulnerability in MongoDB Server where the ldapQueryPassword parameter, when updated at runtime via the setParameter command, logs the new LDAP query password in plain text to the mongod.log file. It was published on June 9, 2026, and affects MongoDB Server versions 7.0.0–7.0.35, 8.0.0–8.0.24, 8.2.0–8.2.10, and 8.3.0–8.3.3. The vulnerability carries a CVSS v3.1 base score of 5.5 (Medium) and a CVSS v4.0 base score of 6.8 (Medium) (GitHub Advisory, MongoDB Jira).

Technical details

The root cause is classified as CWE-532 (Insertion of Sensitive Information into Log File). When an administrator uses the runtime setParameter command to update the ldapQueryPassword configuration parameter, MongoDB's logging subsystem records the new password value in plain text within mongod.log rather than redacting or masking it. Exploitation requires local access and low-level privileges — an attacker or unprivileged local user with read access to the log file can retrieve the LDAP query credential without any additional exploitation technique (GitHub Advisory, MongoDB Jira).

Impact

Successful exploitation results in the disclosure of the LDAP query password used by MongoDB to authenticate against an LDAP directory service. A low-privileged local user who can read mongod.log can obtain this credential, potentially enabling unauthorized access to the LDAP directory, lateral movement within the directory infrastructure, or enumeration of directory objects and user accounts. There is no integrity or availability impact; the risk is confined to confidentiality of the LDAP credential (GitHub Advisory).

Exploitation steps

  1. Gain local access: Obtain a low-privileged local account on the system running the vulnerable MongoDB instance (e.g., through a compromised application account or shared hosting environment).
  2. Wait for or trigger a parameter change: Monitor for or socially engineer an administrator to execute a runtime setParameter command updating ldapQueryPassword, e.g., db.adminCommand({ setParameter: 1, ldapQueryPassword: "<new_password>" }).
  3. Locate the log file: Identify the path to mongod.log (commonly /var/log/mongodb/mongod.log on Linux systems).
  4. Read the log: Use standard file read commands (e.g., grep ldapQueryPassword /var/log/mongodb/mongod.log) to extract the plaintext LDAP password from the log entry generated at the time of the setParameter call.
  5. Use the credential: Leverage the recovered LDAP query password to authenticate against the LDAP directory service for unauthorized access or further reconnaissance (GitHub Advisory, MongoDB Jira).

Indicators of compromise

  • Logs: Presence of ldapQueryPassword with a plaintext password value in mongod.log entries, particularly following a setParameter admin command; review log timestamps for unexpected parameter changes.
  • File System: Unusual access timestamps on mongod.log by non-administrative users or processes; unexpected copies or exfiltration of log files from the MongoDB log directory.
  • Process: Unexpected processes (e.g., grep, cat, awk) run by low-privileged users targeting the MongoDB log directory (/var/log/mongodb/).

Mitigation and workarounds

MongoDB has released patched versions addressing this vulnerability: 7.0.35, 8.0.24, 8.2.10, and 8.3.3. Administrators should upgrade to one of these fixed releases as the primary remediation (GitHub Advisory, MongoDB Jira). As an interim workaround, restrict read access to mongod.log to only authorized administrative accounts, and audit existing logs for any previously exposed ldapQueryPassword values. If a password has been logged in plain text, rotate the LDAP query credential immediately.

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