Description
MAS (Matrix Authentication Service) is a user management and authentication service for Matrix homeservers, written and maintained by Element. A logic flaw in matrix-authentication-service 0.20.0 through 1.4.0 allows an attacker with access to an authenticated MAS session to perform sensitive operations without entering the current password. These include changing the current password, adding or removing an e-mail address and deactivating the account. The vulnerability only affects instances which have the local password database feature enabled (passwords section in the config). Patched in matrix-authentication-service 1.4.1.
Vulnerability type
CWE-620
Unverified Password Change
When setting a new password for a user, the product does not require knowledge of the original password, or using another form of authentication.
Impact on systems
| Scope | Impact |
| Access Control |
Bypass Protection Mechanism, Gain Privileges or Assume Identity This could be used by an attacker to change passwords for another user, thus gaining the privileges associated with that user. |
How to prevent it
Architecture and Design
When prompting for a password change, force the user to provide the original password in addition to the new password.
Architecture and Design
Do not use forgotten password functionality. But if you must, ensure that you are only providing information to the actual user, e.g. by using an email address or challenge question that the legitimate user already provided in the past; do not allow the current user to change this identity information until the correct password has been provided.
All 95 CWE-620 CVEs, with trend and prevention