CVE-2025-25202

CVE-2025-25202 is a medium-severity improper privilege management vulnerability in ash_authentication (erlang), affecting versions >= 4.1.0, < 4.4.9. It is fixed in 4.4.9.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

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

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.

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.

The application assigns, modifies, tracks, or checks privileges incorrectly, allowing a user to gain elevated access. Typical impact: privilege escalation beyond the intended level.

Affected versions

ash_authentication (>= 4.1.0, < 4.4.9)

Security releases

ash_authentication → 4.4.9 (erlang)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

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

Frequently Asked Questions

  1. What is CVE-2025-25202? CVE-2025-25202 is a medium-severity improper privilege management vulnerability in ash_authentication (erlang), affecting versions >= 4.1.0, < 4.4.9. It is fixed in 4.4.9. The application assigns, modifies, tracks, or checks privileges incorrectly, allowing a user to gain elevated access.
  2. Which versions of ash_authentication are affected by CVE-2025-25202? ash_authentication (erlang) versions >= 4.1.0, < 4.4.9 is affected.
  3. Is there a fix for CVE-2025-25202? Yes. CVE-2025-25202 is fixed in 4.4.9. Upgrade to this version or later.
  4. Is CVE-2025-25202 exploitable, and should I be worried? Whether CVE-2025-25202 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  5. What actually determines whether CVE-2025-25202 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  6. How do I fix CVE-2025-25202? Upgrade ash_authentication to 4.4.9 or later.

Other vulnerabilities in ash_authentication

Stop the waste.
Protect your environment with Kodem.