User credentials are logged and emailed in plain text if an exception is raised during login #2880
Labels
status: accepted
This issue has been accepted for implementation
type: bug
A confirmed report of unexpected behavior in the application
When LDAP is misconfigured, the stack trace sent to syslog and via email to the configured admins contains the users password in plain text. This is an information disclosure vulnerability as users of the syslog system, email administrators, and anyone configured as a NetBox admin receives a plain-text copy of a users password if LDAP authentication fails.
If a NetBox server was compromised in some other way, the attacker could use this to gather credentials, pivot, potentially escalate privileges, and move throughout the network.
If this were to happen accidentally, the user logging in and seeing the login failure may not know that their password was exposed to users with access to the NetBox system, email system, email archive, or syslog servers and not realize that their password would need to be changed.
Here is an obfuscated snippet from the email I received when encountering this bug:
Environment
Steps to Reproduce
Expected Behavior
Errors to be logged and potentially emailed with passwords hashed,obfuscated, or not included at all
Actual Behavior
My LDAP password was emailed in plain text as part of the stack trace to the entire team, as well as logged in the log file locally and on the remote syslog server
The text was updated successfully, but these errors were encountered: