Lucene search

K
hackeroneChristophwurstH1:1806275
HistoryDec 15, 2022 - 10:21 a.m.

Nextcloud: Mail app stores cleartext password in database until OAUTH2 setup is done

2022-12-1510:21:14
christophwurst
hackerone.com
34
nextcloud
mail app
cleartext password
oauth2
database
security issue
bug bounty

EPSS

0.001

Percentile

42.5%

Summary:

The Mail app usually stores the user password encrypted. For XOAUTH2 the encrypted access token is stored in the same columns. However, during the time of the setup, XOAUTH2 accounts have the password in clear text in the database.

Steps To Reproduce:

[add details for how we can reproduce the issue]

  1. Configure Gmail Oauth client ID and secret as Nextcloud admin
  2. Open the Mail app
  3. Open the setup page
  4. Enter values for display name
  5. Enter a random value for the password
  6. Enter the gmail address

-> password field hides

  1. Continue the setup

Once the Gmail consent popup shows, look into oc_mail_accounts and the last entry.

inbound_password and outbound_password have the random value entered for the password.

Supporting Material/References:

  • N/A

Impact

A DBA could read the plaintext password

EPSS

0.001

Percentile

42.5%