[Pkg-javascript-devel] Bug#1004548: Security Vulnerability /_data_/…/storage/cfg/…/…/accounts

Mathieu ROY yeupou at gnu.org
Sun Jan 30 10:52:01 GMT 2022


Package: rainloop
Version: 1.16.0+dfsg-1

Hello,

According to https://github.com/RainLoop/rainloop-webmail/issues/2134 there is a security issue in the package:

--------- 
Expected behavior:
File can't be decrypted on (backup) server.

actual behavior:
File can be decrypted on (backup) server.

Steps to reproduce the problem:
When calling \RainLoop\Actions->SetAccounts()
It will store an array of values from \RainLoop\Model\Account->GetAuthToken()
Which in turn calls \RainLoop\Utils::EncodeKeyValues()
And that calls \RainLoop\Utils::EncryptString(@\serialize($aValues), \md5(APP_SALT))

When someone/something has access to the SALT.php file,
it can decode the encrypted accounts and gain all passwords.

These days with server breaches, ransomware, other attacks and the increase of backup behavior, the chance of being listed on "have i been pwned" has increased and the above mentioned issue becomes a bigger vulnerability.

Solutions:

    Encrypting the file based on user cookie is very unreliable and has a high fail rate.
    Encrypting with a server stored key (like the SALT.php) opens this issue
    Encrypting using the main account password (the login) fails when password is changed or when using OAUTHBEARER/XOAuth2
    Only encrypting the account passwords with (3) keeps the accounts, but only login will fail.

With (4) you could store an HMAC of the encrypted password to check if the account login works.
Same issue applies to the 'contacts_sync' file
--------- 

This was reported in november 2021 and left with no public reply.
This problem is reportedly fixed in rainloop fork named Snappymail https://snappymail.eu/

There is also another pending security issue, not yet published, https://github.com/RainLoop/rainloop-webmail/issues/2142 also left with no public reply.




Regards



More information about the Pkg-javascript-devel mailing list