CVE-2026-21622
JSON

9.5critical

Password Reset Tokens Do Not Expire

Severity
9.5critical CVSS:4.0 by EEF
Exploit likelihood
0.77% (higher than 52% of CVEs)
Published
Last changed
Assigned by
EEF
Also known as
EEF-CVE-2026-21622GHSA-6r94-pvwf-mxqm

Description

Insufficient Session Expiration vulnerability in hexpm hexpm/hexpm (Hexpm.Accounts.PasswordReset module) allows Account Takeover. Password reset tokens generated via the "Reset your password" flow do not expire. When a user requests a password reset, Hex sends an email containing a reset link with a token. This token remains valid indefinitely until used. There is no time-based expiration enforced. If a user's historical emails are exposed through a data breach (e.g., a leaked mailbox archive), any unused password reset email contained in that dataset could be used by an attacker to reset the victim's password. The attacker does not need current access to the victim's email account, only access to a previously leaked copy of the reset email. This vulnerability is associated with program files lib/hexpm/accounts/password_reset.ex and program routines Hexpm.Accounts.PasswordReset.can_reset?/3. This issue affects hex.pm: from 2025-08-01 before 2026-03-05; hexpm/hexpm: from 617e44c71f1dd9043870205f371d375c5c4d886d before bb0e42091995945deef10556f58d046a52eb7884.

Affected

Product or packageVersionsReported by
hex.pmfrom 2025-08-01 before 2026-03-05CVE List
hexpm/hexpmfrom 617e44c71f1dd9043870205f371d375c5c4d886d before bb0e42091995945deef10556f58d046a52eb7884CVE List
https://github.com/hexpm/hexpmfrom 617e44c71f1dd9043870205f371d375c5c4d886d before bb0e42091995945deef10556f58d046a52eb7884Erlang Ecosystem Foundation
hex hexpmfrom 2025-10-01 before 2026-03-05NVD

All scores

EEF9.5critical CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:L/SC:H/SI:H/SA:L
Erlang Ecosystem FoundationNot scored CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:L/SC:H/SI:H/SA:L
NVD9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Classification

CWE-613

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact total.

What each source says

CVE List

Insufficient Session Expiration vulnerability in hexpm hexpm/hexpm (Hexpm.Accounts.PasswordReset module) allows Account Takeover. Password reset tokens generated via the "Reset your password" flow do not expire. When a user requests a password reset, Hex sends an email containing a reset link with a token. This token remains valid indefinitely until used. There is no time-based expiration enforced. If a user's historical emails are exposed through a data breach (e.g., a leaked mailbox archive), any unused password reset email contained in that dataset could be used by an attacker to reset the victim's password. The attacker does not need current access to the victim's email account, only access to a previously leaked copy of the reset email. This vulnerability is associated with program files lib/hexpm/accounts/password_reset.ex and program routines Hexpm.Accounts.PasswordReset.can_reset?/3. This issue affects hex.pm: from 2025-08-01 before 2026-03-05; hexpm/hexpm: from 617e44c71f1dd9043870205f371d375c5c4d886d before bb0e42091995945deef10556f58d046a52eb7884.

Erlang Ecosystem Foundation

Summary

Insufficient Session Expiration vulnerability in hexpm hexpm/hexpm (Hexpm.Accounts.PasswordReset module) allows Account Takeover.

Password reset tokens generated via the "Reset your password" flow do not expire. When a user requests a password reset, Hex sends an email containing a reset link with a token. This token remains valid indefinitely until used. There is no time-based expiration enforced.

If a user's historical emails are exposed through a data breach (e.g., a leaked mailbox archive), any unused password reset email contained in that dataset could be used by an attacker to reset the victim's password. The attacker does not need current access to the victim's email account, only access to a previously leaked copy of the reset email.

This vulnerability is associated with program files lib/hexpm/accounts/password_reset.ex and program routines Hexpm.Accounts.PasswordReset.can_reset?/3.

This issue affects hex.pm: from 2025-08-01 before 2026-03-05; hexpm/hexpm: from 617e44c71f1dd9043870205f371d375c5c4d886d before bb0e42091995945deef10556f58d046a52eb7884.

Workarounds

Users who suspect email exposure should:

  • Immediately reset their password.
  • Enable and enforce 2FA.

There is no complete mitigation without implementing token expiration.

NVD (es)

Vulnerabilidad de expiración de sesión insuficiente en hexpm hexpm/hexpm (módulo 'Elixir.Hexpm.Accounts.PasswordReset') permite la toma de control de cuentas. Los tokens de restablecimiento de contraseña generados a través del flujo 'Restablecer su contraseña' no expiran. Cuando un usuario solicita un restablecimiento de contraseña, Hex envía un correo electrónico que contiene un enlace de restablecimiento con un token. Este token permanece válido indefinidamente hasta que se usa. No se aplica ninguna expiración basada en el tiempo. Si los correos electrónicos históricos de un usuario se exponen a través de una violación de datos (por ejemplo, un archivo de buzón de correo filtrado), cualquier correo electrónico de restablecimiento de contraseña no utilizado contenido en ese conjunto de datos podría ser utilizado por un atacante para restablecer la contraseña de la víctima. El atacante no necesita acceso actual a la cuenta de correo electrónico de la víctima, solo acceso a una copia previamente filtrada del correo electrónico de restablecimiento. Esta vulnerabilidad está asociada con los archivos de programa lib/hexpm/accounts/password_reset.ex y las rutinas de programa 'Elixir.Hexpm.Accounts.PasswordReset':can_reset?/3. Este problema afecta a hexpm: desde 617e44c71f1dd9043870205f371d375c5c4d886d antes de bb0e42091995945deef10556f58d046a52eb7884.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-21622 changed 2026-11-20CVE Terms of Use
Erlang Ecosystem FoundationEEF-CVE-2026-21622 changed 2026-11-25CC-BY-4.0
NVDCVE-2026-21622 changed 2026-11-20Public domain