# CVE-2025-64521: authentik deactivated service accounts can authenticate to OAuth

> Attackers can authenticate using deactivated service accounts in authentik OAuth providers, bypassing intended access restrictions.

- **Severity:** Medium 4.8 (`CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 19 Nov 2025
- **Updated:** 19 Nov 2025
- **Also known as:** BIT-authentik-2025-64521, GHSA-xr73-jq5p-ch8r, GO-2025-4137, PYSEC-2025-237

## What is CVE-2025-64521?

CVE-2025-64521 is a medium-severity authentication bypass vulnerability in goauthentik authentik, published on 19 Nov 2025. An attacker needs administrator access to exploit it, and only if a user opens a file or follows a link.

### Official description

authentik is an open-source Identity Provider. Prior to versions 2025.8.5 and 2025.10.2, when authenticating with client_id and client_secret to an OAuth provider, authentik creates a service account for the provider. In previous authentik versions, authentication for this account was possible even when the account was deactivated. Other permissions are correctly applied and federation with other providers still take assigned policies correctly into account. authentik versions 2025.8.5 and 2025.10.2 fix this issue. A workaround involves adding a policy to the application that explicitly checks if the service account is still valid, and deny access if not.

Weakness: CWE-289 (Authentication Bypass by Alternate Name)

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

5 open source packages ship an affected version, including goauthentik.io, authentik and authentik-client. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `goauthentik.io` | Go | All versions | None |
| `goauthentik.io` | Go | All versions | 0.0.0-20251119140106-9dbdfc3f1be0 |
| `goauthentik.io` | Go | All versions | 0.0.0-20251119140106-9dbdfc3f1be0 |
| `authentik` | Bitnami | All versions | 0.0.0-20251119140106-9dbdfc3f1be0, 2025.8.5, 2025.10.2 |
| `authentik-client` | PyPI | From 2025.8.0 | 2025.8.5, 2025.10.2 |

Products: Goauthentik Authentik.

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

Upgrade goauthentik.io to 0.0.0-20251119140106-9dbdfc3f1be0 or later.

## Is CVE-2025-64521 being exploited?

There is no known exploitation of CVE-2025-64521 in the wild and no public exploit code.

## Other vulnerabilities in goauthentik authentik

- [CVE-2026-49448](https://insights.sbomify.com/CVE-2026-49448/): authentik: SourceStage bypass via empty POST (critical 9.8)
- [CVE-2023-46249](https://insights.sbomify.com/CVE-2023-46249/): authentik potential installation takeover when default admin user is deleted (critical 9.7)
- [CVE-2022-23555](https://insights.sbomify.com/CVE-2022-23555/): authentik vulnerable to Improper Authentication via invitation URL token reuse (critical 9.4)
- [CVE-2026-42849](https://insights.sbomify.com/CVE-2026-42849/): authentik: Reflected XSS in SFE AutosubmitStage allows IDP account takeover (critical 9.3)
- [CVE-2026-25227](https://insights.sbomify.com/CVE-2026-25227/): authentik affected by Remote Code Execution via Context Key Injection in PropertyMapping Test Endpoint (critical 9.1)

## Fix prompt for AI coding agents

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

What it is: CVE-2025-64521 is a medium-severity authentication bypass vulnerability in goauthentik authentik, published on 19 Nov 2025. An attacker needs administrator access to exploit it, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2025-64521 in the wild and no public exploit code.

Affected packages and fixed versions:
- goauthentik.io (Go): affected all versions; no fix listed
- goauthentik.io (Go): affected all versions; fixed in 0.0.0-20251119140106-9dbdfc3f1be0
- goauthentik.io (Go): affected all versions; fixed in 0.0.0-20251119140106-9dbdfc3f1be0
- authentik (Bitnami): affected all versions; fixed in 0.0.0-20251119140106-9dbdfc3f1be0, 2025.8.5, 2025.10.2
- authentik-client (PyPI): affected from 2025.8.0; fixed in 2025.8.5, 2025.10.2

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-64521/ (Markdown: https://insights.sbomify.com/CVE-2025-64521/index.md)
```

## Sources

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

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