# CVE-2025-53942: authentik has an insufficient check for account active status during OAuth/SAML authentication

> Deactivated users can retain partial access to authorize applications in authentik, bypassing account deactivation controls.

- **Severity:** High 7.1 (`CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:N/SC:H/SI:H/SA:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 23 Jul 2025
- **Updated:** 23 Jul 2025
- **Also known as:** BIT-authentik-2025-53942, GHSA-9g4j-v8w5-7x42, GO-2025-3822

## What is CVE-2025-53942?

CVE-2025-53942 is a high-severity authentication bypass vulnerability in goauthentik authentik, published on 23 Jul 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

authentik is an open-source Identity Provider that emphasizes flexibility and versatility, with support for a wide set of protocols. In versions 2025.4.4 and earlier, as well as versions 2025.6.0-rc1 through 2025.6.3, deactivated users who registered through OAuth/SAML or linked their accounts to OAuth/SAML providers can still retain partial access to the system despite their accounts being deactivated. They end up in a half-authenticated state where they cannot access the API but crucially they can authorize applications if they know the URL of the application. To workaround this issue, developers can add an expression policy to the user login stage on the respective authentication flow with the expression of return request.context["pending_user"].is_active. This modification ensures that the return statement only activates the user login stage when the user is active. This issue is fixed in versions authentik 2025.4.4 and 2025.6.4.

Weakness: CWE-269 (Improper Privilege Management)

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

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `goauthentik.io` | Go | All versions | None |
| `goauthentik.io` | Go | All versions | 0.0.0-20250722122105-7a4c6b9b50f8 |
| `goauthentik.io` | Go | All versions | 0.0.0-20250722122105-7a4c6b9b50f8 |
| `authentik` | Bitnami | All versions | 2025.4.4, 2025.6.4 |

Products: Goauthentik Authentik.

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

Upgrade goauthentik.io to 0.0.0-20250722122105-7a4c6b9b50f8 or later.

## Is CVE-2025-53942 being exploited?

There is no known exploitation of CVE-2025-53942 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-53942 and fix it if it is affected.

What it is: CVE-2025-53942 is a high-severity authentication bypass vulnerability in goauthentik authentik, published on 23 Jul 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2025-53942 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-20250722122105-7a4c6b9b50f8
- goauthentik.io (Go): affected all versions; fixed in 0.0.0-20250722122105-7a4c6b9b50f8
- authentik (Bitnami): affected all versions; fixed in 2025.4.4, 2025.6.4

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

## Sources

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

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