CVE-2025-25202
JSON

6.3medium

Ash Authentication has flawed token revocation checking logic in actions generated by `mix ash_authentication.install`

Severity
6.3medium CVSS:4.0 by GitHub_M
Exploit likelihood
0.32% (higher than 27% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-qrm9-f75w-hg4c

Description

Ash Authentication is an authentication framework for Elixir applications. Applications which have been bootstrapped by the igniter installer present since AshAuthentication v4.1.0 and who have used the magic link strategy _or_ are manually revoking tokens are affected by revoked tokens being allowed to verify as valid. Unless one hase implemented any kind of custom token revocation feature in your application, then one will not be affected. The impact here for users using builtin functionality is that magic link tokens are reusable until they expire. With that said, magic link tokens are only valid for 10 minutes, so the surface area for abuse is extremely low here. The flaw is patched in version 4.4.9. Additionally a compile time warning is shown to users with remediation instructions if they upgrade. 4.4.9 ships with an upgrader, so those who use `mix igniter.upgrade ash_authentication` will have the necessary patch applied. Otherwise, one may run the upgrader manually as described in the error message. As a workaround, delete the generated `:revoked?` generic action in the token resource. This will cause it to use the one internal to Ash Authentication which has always been correct. Alternatively, manually make the changes that are included in the patch.

Affected

Product or packageVersionsReported by
team-alembic ash_authentication>= 4.1.0, < 4.4.9CVE List
ash_authentication (Hex)from 4.1.0 before 4.4.9GitHub Advisory Database
alembic ash_authenticationfrom 4.1.0 before 4.4.9NVD

All scores

GitHub_M6.3medium CVSS:4.0CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N
GitHubmedium CVSS:4.0CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N
NVD6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N

Classification

CWE-269

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.

What each source says

CVE List

Ash Authentication is an authentication framework for Elixir applications. Applications which have been bootstrapped by the igniter installer present since AshAuthentication v4.1.0 and who have used the magic link strategy _or_ are manually revoking tokens are affected by revoked tokens being allowed to verify as valid. Unless one hase implemented any kind of custom token revocation feature in your application, then one will not be affected. The impact here for users using builtin functionality is that magic link tokens are reusable until they expire. With that said, magic link tokens are only valid for 10 minutes, so the surface area for abuse is extremely low here. The flaw is patched in version 4.4.9. Additionally a compile time warning is shown to users with remediation instructions if they upgrade. 4.4.9 ships with an upgrader, so those who use `mix igniter.upgrade ash_authentication` will have the necessary patch applied. Otherwise, one may run the upgrader manually as described in the error message. As a workaround, delete the generated `:revoked?` generic action in the token resource. This will cause it to use the one internal to Ash Authentication which has always been correct. Alternatively, manually make the changes that are included in the patch.

GitHub Advisory Database
Impact

Applications which have been bootstrapped by the new igniter installer (since AshAuthentication v4.1.0) and who have used the magic link strategy, password resets, confirmation, or are manually revoking tokens are affected by revoked tokens being allowed to verify as valid. If you did not use the new installer, then you are absolutely not affected.

Additionally, unless you have implemented any kind of custom token revocation feature in your application (in which case even cursory testing would have uncovered this issue), then you will not be significantly affected.

The impact here for users is as follows:

  • For users using the magic link strategy, magic link tokens are reusable until they expire instead of being immediately revoked. By default magic link tokens are valid for 10 minutes.
  • For users of password resets in the password strategy, password reset tokens are reusable until they expire instead of being immediately revoked. By default password reset tokens are valid for 3 days.
  • For users of the confirmation add-on, confirmation tokens are reusable until they expire instead of being immediately revoked. By default password reset tokens are valid for 3 days.
Patches

The flaw is patched in version 4.4.9. Additionally a compile time warning is shown to users with remediation instructions if they upgrade. 4.4.9 ships with an upgrader, so if you use mix igniter.upgrade ash_authentication the necessary patch will be applied for you. Otherwise you can run the upgrader manually as described in the error message

Example
[warning] Warning while compiling Tunez.Accounts.Token:

The `:jti` and `:token` options to the `:revoked?` action must allow nil values and it must return a `:boolean`.

This was an error in our igniter installer previous to version 4.4.9, which allowed revoked tokens to be reused.

To fix this, run the following command in your shell:

    mix ash_authentication.upgrade 4.4.8 4.4.9

Or:

  - remove `allow_nil?: false` from these action arguments, and
  - ensure that the action returns `:boolean`.

  like so:

    action :revoked?, :boolean do
      description "Returns true if a revocation token is found for the provided token"
      argument :token, :string, sensitive?: true
      argument :jti, :string, sensitive?: true

      run AshAuthentication.TokenResource.IsRevoked
    end
Workarounds

Delete the generated :revoked? generic action in your token resource This will cause it to use the one internal to AshAuthentication which has always been correct. Alternatively, manually make the changes described above.

References

See the #ash_authentication channel on the Ash Discord.

NVD (es)

Ash Authentication es un framework de autenticación para aplicaciones Elixir. Las aplicaciones que se han iniciado con el instalador de Igniter presente desde AshAuthentication v4.1.0 y que han utilizado la estrategia de enlace mágico _o_ están revocando tokens manualmente se ven afectadas por el hecho de que se permite que los tokens revocados se verifiquen como válidos. A menos que uno haya implementado algún tipo de función de revocación de token personalizada en su aplicación, no se verá afectado. El impacto aquí para los usuarios que utilizan la funcionalidad incorporada es que los tokens de enlace mágico se pueden reutilizar hasta que caduquen. Dicho esto, los tokens de enlace mágico solo son válidos durante 10 minutos, por lo que la superficie de abuso es extremadamente baja aquí. La falla se corrige en la versión 4.4.9. Además, se muestra una advertencia de tiempo de compilación a los usuarios con instrucciones de solución si actualizan. 4.4.9 se envía con un actualizador, por lo que aquellos que usan `mix igniter.upgrade ash_authentication` tendrán el parche necesario aplicado. De lo contrario, uno puede ejecutar el actualizador manualmente como se describe en el mensaje de error. Como workaround, elimine la acción genérica `:revoked?` generada en el recurso de token. Esto hará que utilice la acción interna de Ash Authentication que siempre ha sido correcta. Como alternativa, realice manualmente los cambios que se incluyen en el parche.

References

Sources

SourceRecordLicence
CVE ListCVE-2025-25202 changed 2025-02-12CVE Terms of Use
GitHub Advisory DatabaseGHSA-qrm9-f75w-hg4c changed 2025-12-10CC-BY-4.0
NVDCVE-2025-25202 changed 2026-06-17Public domain