Skip to main content

Insertion of Sensitive Information into Log File


Severity High
Score 7.5/10


Some MongoDB Drivers may erroneously publish events containing authentication-related data to a command listener configured by an application. The published events may contain security-sensitive data when specific authentication-related commands are executed. Without due care, an application may inadvertently expose this sensitive information, e.g., by writing it to a log file. This issue only arises if an application enables the command listener feature (this is not enabled by default). This issue affects mongo-c-driver package versions 1.0.0 through 1.17.6, mongo-cxx-driver package versions 3.0.0-rc0 through 3.5.1, NPM mongodb package versions 3.3.0-beta1 through 3.6.9, and 4.0.0-beta.0 through 4.0.0-beta.5, mongodb/mongodb PHP package versions 1.0.0alpha1 through 1.9.1, and MongoDB Swift Driver versions 1.0.0-rc0 through 1.1.0.

  • LOW
  • NONE
  • NONE
  • NONE
  • HIGH
  • NONE

CWE-532 - Insertion of Sensitive Information into Log File

It's quite common for applications to save logs. For example, whenever a user requests a resource from a particular website, the web server writes information about the request to a log file. These files are helpful for identifying abnormal system activity, bugs, and evaluating the security controls of the application. Security of log files is critical for the overall security of the application and its confidential resources. An application that lacks appropriate logging levels can expose sensitive user data and system information stored on the log files to malicious users. This info can be exploited to compromise your system.

Advisory Timeline

  • Published