// For flags

CVE-2021-41100

Account takeover when having only access to a user's short lived token in wire-server

Severity Score

9.8
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

0
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

-
*SSVC
Descriptions

Wire-server is the backing server for the open source wire secure messaging application. In affected versions it is possible to trigger email address change of a user with only the short-lived session token in the `Authorization` header. As the short-lived token is only meant as means of authentication by the client for less critical requests to the backend, the ability to change the email address with a short-lived token constitutes a privilege escalation attack. Since the attacker can change the password after setting the email address to one that they control, changing the email address can result in an account takeover by the attacker. Short-lived tokens can be requested from the backend by Wire clients using the long lived tokens, after which the long lived tokens can be stored securely, for example on the devices key chain. The short lived tokens can then be used to authenticate the client towards the backend for frequently performed actions such as sending and receiving messages. While short-lived tokens should not be available to an attacker per-se, they are used more often and in the shape of an HTTP header, increasing the risk of exposure to an attacker relative to the long-lived tokens, which are stored and transmitted in cookies. If you are running an on-prem instance and provision all users with SCIM, you are not affected by this issue (changing email is blocked for SCIM users). SAML single-sign-on is unaffected by this issue, and behaves identically before and after this update. The reason is that the email address used as SAML NameID is stored in a different location in the databse from the one used to contact the user outside wire. Version 2021-08-16 and later provide a new end-point that requires both the long-lived client cookie and `Authorization` header. The old end-point has been removed. If you are running an on-prem instance with at least some of the users invited or provisioned via SAML SSO and you cannot update then you can block `/self/email` on nginz (or in any other proxies or firewalls you may have set up). You don't need to discriminate by verb: `/self/email` only accepts `PUT` and `DELETE`, and `DELETE` is almost never used.

Wire-server es el servidor de respaldo de la aplicación de mensajería segura de código abierto Wire. En las versiones afectadas es posible activar el cambio de dirección de correo electrónico de un usuario con sólo el token de sesión de corta duración en el encabezado "Authorization". Como el token de corta duración sólo sirve como medio de autenticación por parte del cliente para peticiones menos críticas al backend, la posibilidad de cambiar la dirección de correo electrónico con un token de corta duración constituye un ataque de escalada de privilegios. Dado que el atacante puede cambiar la contraseña después de establecer la dirección de correo electrónico a uno que ellos controlan, el cambio de la dirección de correo electrónico puede resultar en una toma de control de la cuenta por el atacante. Los tokens de corta duración pueden ser solicitados desde el backend por los clientes de Wire que usan los tokens de larga duración, tras lo cual los tokens de larga duración pueden ser almacenados de forma segura, por ejemplo en el llavero de los dispositivos. Los tokens de vida corta pueden usarse entonces para autenticar al cliente ante el backend para las acciones que se realizan con frecuencia, como el envío y la recepción de mensajes. Mientras que los tokens de corta duración no deberían estar disponibles para un atacante per se, son usados con más frecuencia y en forma de encabezado HTTP, lo que aumenta el riesgo de exposición a un atacante en relación con los tokens de larga duración, que son almacenados y transmiten en cookies. Si está ejecutando una instancia on-prem y aprovisiona a todos los usuarios con SCIM, no está afectado por este problema (el cambio de correo electrónico está bloqueado para usuarios de SCIM). El inicio de sesión único de SAML no está afectado por este problema y se comporta de forma idéntica antes y después de esta actualización. La razón es que la dirección de correo electrónico usada como SAML NameID es almacenada en una ubicación diferente en la base de datos de la que es utilizada para contactar con el usuario fuera de Wire. Las versiones 2021-08-16 y posteriores proporcionan un nuevo endpoint que requiere tanto la cookie de cliente de larga duración como el encabezado "Authorization". El antiguo endpoint ha sido eliminado. Si está ejecutando una instancia on-prem con al menos algunos de los usuarios invitados o aprovisionados por medio de SAML SSO y no puede actualizar, entonces puede bloquear "/self/email" en nginz (o en cualquier otro proxy o firewall que haya configurado). No es necesario discriminar por verbo: "/self/email" sólo acepta "PUT" y "DELETE", y "DELETE" casi nunca es usado

*Credits: N/A
CVSS Scores
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None
Attack Vector
Network
Attack Complexity
Low
Authentication
None
Confidentiality
Partial
Integrity
Partial
Availability
Partial
* Common Vulnerability Scoring System
SSVC
  • Decision:-
Exploitation
-
Automatable
-
Tech. Impact
-
* Organization's Worst-case Scenario
Timeline
  • 2021-09-15 CVE Reserved
  • 2021-10-04 CVE Published
  • 2024-06-19 EPSS Updated
  • 2024-08-04 CVE Updated
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
  • ---------- First Exploit
CWE
  • CWE-285: Improper Authorization
  • CWE-613: Insufficient Session Expiration
CAPEC
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Wire
Search vendor "Wire"
Wire-server
Search vendor "Wire" for product "Wire-server"
< 2021-08-16
Search vendor "Wire" for product "Wire-server" and version " < 2021-08-16"
-
Affected