CVE-2025-25202: Ash authentication Ash Authentication Has Flawed Token Vulnerability

MODERATE
Advisory Identifier: GHSA-qrm9-f75w-hg4c
CWE-269
Published
Advisory Summary

CVE-2025-25202 is a MODERATE ash authentication has flawed token vulnerability (CWE-269: Improper Privilege Management) affecting Ash authentication libraries in the Hex ecosystem. The issue involves ash authentication has flawed token revocation checking logic in actions generated by `mix ash_authentication.install`. Remediation is available by upgrading affected packages to version 4.4.9.

CVE-2025-25202 at a Glance

CVE Identifier CVE-2025-25202
GHSA Identifier GHSA-qrm9-f75w-hg4c
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-269: Improper Privilege Management
Affected Product Ash authentication
Package Ecosystem Hex
Published Date
Last Updated

How to Fix CVE-2025-25202

To remediate this vulnerability, upgrade all affected Ash authentication dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

ash_authentication fixed: 4.4.9
Upgrade ash_authentication to 4.4.9
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for ash_authentication

How to Check if You Are Affected

To determine whether your application is affected by CVE-2025-25202, inspect your project dependencies for Ash authentication:

inspect dependencies for ash_authentication

Analyze the terminal output to locate any version of Ash authentication in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.4.9), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-269: Improper Privilege Management, where the product does not properly assign, modify, track, or check privileges for an actor, creating an unintended sphere of control for that actor. In Ash authentication, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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 ```elixir [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.

CVE-2025-25202 Affected Ash authentication Versions

1 component(s)
Fixed Versions:
4.4.9
Product / Package Ecosystem Affected Versions Fixed Version
ash_authentication
Hex
≥ 4.1.0
< 4.4.9
4.4.9

References

Frequently Asked Questions

What is CVE-2025-25202?
CVE-2025-25202 is a security vulnerability in Ash authentication involving Ash Authentication has flawed token revocation checking logic in actions generated by `mix ash_authentication.install` under CWE-269: Improper Privilege Management.
Which Ash authentication versions are affected?
Affected versions include releases prior to 4.4.9 across affected packages: ash_authentication.
What version fixes CVE-2025-25202?
Upgrading to 4.4.9 (or the latest patched release for your respective branch) resolves the vulnerability.
Is ash_authentication affected?
Yes, ash_authentication is affected in releases prior to 4.4.9. Upgrade your dependency to 4.4.9 or later.
What CWE is associated with CVE-2025-25202?
CVE-2025-25202 is classified under CWE-269: Improper Privilege Management (The product does not properly assign, modify, track, or check privileges for an actor, creating an unintended sphere of control for that actor.).
How can I check Hex dependencies for CVE-2025-25202?
Run the dependency tree command: 'inspect dependencies for ash_authentication'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-qrm9-f75w-hg4c",
  "modified" : "2025-02-11T21:40:09Z",
  "published" : "2025-02-11T18:12:33Z",
  "aliases" : [ "CVE-2025-25202" ],
  "summary" : "Ash Authentication has flawed token revocation checking logic in actions generated by `mix ash_authentication.install`",
  "details" : "### Impact\n\nApplications 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.\n\nAdditionally, 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. \n\nThe impact here for users is as follows:\n\n  - 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.\n  - 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.\n  - 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.\n\n### Patches\n\nThe 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\n\n#### Example\n```elixir\n[warning] Warning while compiling Tunez.Accounts.Token:\n\nThe `:jti` and `:token` options to the `:revoked?` action must allow nil values and it must return a `:boolean`.\n\nThis was an error in our igniter installer previous to version 4.4.9, which allowed revoked tokens to be reused.\n\nTo fix this, run the following command in your shell:\n\n    mix ash_authentication.upgrade 4.4.8 4.4.9\n\nOr:\n\n  - remove `allow_nil?: false` from these action arguments, and\n  - ensure that the action returns `:boolean`.\n\n  like so:\n\n    action :revoked?, :boolean do\n      description \"Returns true if a revocation token is found for the provided token\"\n      argument :token, :string, sensitive?: true\n      argument :jti, :string, sensitive?: true\n\n      run AshAuthentication.TokenResource.IsRevoked\n    end\n```\n\n### Workarounds\n\nDelete 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.\n\n### References\n\nSee the `#ash_authentication` channel on the Ash Discord.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Hex",
      "name" : "ash_authentication"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.1.0"
      }, {
        "fixed" : "4.4.9"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/team-alembic/ash_authentication/security/advisories/GHSA-qrm9-f75w-hg4c"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-25202"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/team-alembic/ash_authentication/commit/2dee55252df26fe3d990ff1199397cdcf1bfea8a"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/team-alembic/ash_authentication"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-269" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-02-11T18:12:33Z",
    "nvd_published_at" : "2025-02-11T19:15:18Z"
  }
}