# CVE-2025-25202: Ash Authentication has flawed token revocation checking logic in actions generated by `mix ash_authentication.install`

> Attackers can reuse expired magic link tokens to access accounts if custom token revocation logic was generated by the installer.

- **Severity:** Medium 6.3 (`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`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 11 Feb 2025
- **Updated:** 12 Feb 2025
- **Also known as:** GHSA-qrm9-f75w-hg4c

## What is CVE-2025-25202?

CVE-2025-25202 is a medium-severity authentication bypass vulnerability in team-alembic ash_authentication, published on 11 Feb 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official 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.

Weakness: CWE-269 (Improper Privilege Management)

## Which versions are affected by CVE-2025-25202?

2 open source packages ship an affected version, including ash_authentication. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `ash_authentication` | Hex | From 4.1.0 | 4.4.9 |
| `ash_authentication` | Hex | From 4.1.0 | 4.4.9 |

Products: Alembic Ash Authentication.

## How do I fix CVE-2025-25202?

Upgrade ash_authentication to 4.4.9 or later.

## Is CVE-2025-25202 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-25202 exists.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-25202 and fix it if it is affected.

What it is: CVE-2025-25202 is a medium-severity authentication bypass vulnerability in team-alembic ash_authentication, published on 11 Feb 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-25202 exists.

Affected packages and fixed versions:
- ash_authentication (Hex): affected from 4.1.0; fixed in 4.4.9
- ash_authentication (Hex): affected from 4.1.0; fixed in 4.4.9

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-25202/ (Markdown: https://insights.sbomify.com/CVE-2025-25202/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-25202
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-25202
- OSV: https://osv.dev/vulnerability/CVE-2025-25202

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-25202/
Summaries are generated and may contain mistakes; the official description above is the record.
