Skip to content
Info disclosure Disclosed report Beginner

Password of failed (2FA) login attempt is stored in log

A failed WebDAV login attempt with a valid password but missing 2FA causes the plaintext password to be written to the Nextcloud log. Anyone with access to the log file, such as administrators or recipients of debugging logs, could read the password and potentially reuse it on other services or to disable 2FA.

maprambo Follow

Originally disclosed on HackerOne

  • Triaged in 6 days
  • Fixed in 48 days
  • Disclosed after 2.7 years

If I try to log in on Webdav with my usual Nextcloud password, it doesn't work due to 2FA. I need an application password.

The password of a failed login attempt by any user is stored plain text in the log: [...]OCA\\\\DAV\\\\Connector\\\\Sabre\\\\Auth->validateUserPass('matthes', '***THE_PASSWORD***')[...]

Even though the login attempt failed, the password is the right password. I am using two factor, but still, the password may not be leaked to anyone. It may also be used for other websites or services, like LDAP. And you can disable 2FA and still use the same password. The log is in some cases visible to multiple people, may it be admins (but who shouldn't have access to the user data) or if the file is just sent to someone else for debugging.

The original report as published on HackerOne, by maprambo. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely, the authentication code logs the password argument during a failed login attempt without redacting it.

Impact

The plaintext password could be exposed to administrators or anyone with access to the log file, and could be reused on other services or to disable 2FA.

What the attacker needed

Access to the Nextcloud log file; a user attempts WebDAV login with 2FA enabled

The fix

Passwords should not be written to logs in plain text.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

When you log in, your password is normally checked secretly. Here, if the login fails because a second security step (two-factor authentication) is missing, the system writes your actual password into a log file in plain text. That log file might be seen by administrators or shared for debugging, so the password is no longer secret.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

More from Nextcloud

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.