CVE-2025-53942

7.4 HIGH

📋 TL;DR

This vulnerability allows deactivated users who registered via OAuth/SAML to retain partial system access in authentik. They can authorize applications if they know the application URL, despite being in a half-authenticated state where API access is blocked. This affects authentik versions 2025.4.4 and earlier, and 2025.6.0-rc1 through 2025.6.3.

💻 Affected Systems

Products:
  • authentik
Versions: 2025.4.4 and earlier, 2025.6.0-rc1 through 2025.6.3
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects users who registered through OAuth/SAML or linked accounts to OAuth/SAML providers.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Deactivated users could access sensitive applications and data they should no longer have permission to use, potentially leading to unauthorized data exposure or privilege escalation.

🟠

Likely Case

Deactivated users with knowledge of application URLs could access applications they previously used, bypassing intended access controls.

🟢

If Mitigated

With proper controls, impact is limited as users need specific application URLs and cannot access APIs, but unauthorized application access remains possible.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires deactivated user credentials and knowledge of application URLs.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 2025.4.4 and 2025.6.4

Vendor Advisory: https://github.com/goauthentik/authentik/security/advisories/GHSA-9g4j-v8w5-7x42

Restart Required: Yes

Instructions:

1. Update authentik to version 2025.4.4 or 2025.6.4. 2. Restart the authentik service. 3. Verify the update was successful.

🔧 Temporary Workarounds

Expression Policy Workaround

all

Add an expression policy to the user login stage on the respective authentication flow with the expression 'return request.context["pending_user"].is_active' to ensure only active users can proceed.

🧯 If You Can't Patch

  • Implement the expression policy workaround described above.
  • Monitor logs for unauthorized access attempts by deactivated users and review user access controls.

🔍 How to Verify

Check if Vulnerable:

Check authentik version via admin interface or command line. If version is 2025.4.4 or earlier, or between 2025.6.0-rc1 and 2025.6.3, the system is vulnerable.

Check Version:

Check via authentik admin interface or run 'ak version' if using CLI.

Verify Fix Applied:

After patching, verify the version is 2025.4.4 or 2025.6.4. Test with a deactivated OAuth/SAML user to ensure they cannot access applications.

📡 Detection & Monitoring

Log Indicators:

  • Log entries showing deactivated users attempting or succeeding in accessing applications via OAuth/SAML flows.

Network Indicators:

  • Unusual authentication requests from deactivated user accounts to application endpoints.

SIEM Query:

source="authentik" AND (user_status="deactivated" OR user_active="false") AND event_type="authentication_success"

🔗 References

📤 Share & Export