CVE-2024-37905

8.8 HIGH

📋 TL;DR

This vulnerability in authentik's API-Access-Token mechanism allows attackers to escalate privileges to full admin access. Any authentik instance running vulnerable versions is affected, enabling attackers to reset user passwords and perform administrative actions. The issue stems from improper access control in the token mechanism.

💻 Affected Systems

Products:
  • authentik
Versions: All versions before 2024.2.4, 2024.4.2, and 2024.6.0
Operating Systems: All platforms running authentik
Default Config Vulnerable: ⚠️ Yes
Notes: All authentik deployments using API access tokens are vulnerable regardless of configuration.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete compromise of the authentik identity provider, allowing attackers to reset any user's password, modify authentication flows, and potentially gain access to all connected applications.

🟠

Likely Case

Unauthorized administrative access leading to user account compromise, privilege escalation for existing users, and potential lateral movement to connected systems.

🟢

If Mitigated

Limited impact if network segmentation restricts access to authentik administration interfaces and strong authentication is required for administrative functions.

🌐 Internet-Facing: HIGH
🏢 Internal Only: HIGH

🎯 Exploit Status

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

Exploitation requires some level of access to the authentik instance but the vulnerability is in a core authentication mechanism.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 2024.2.4, 2024.4.2, or 2024.6.0

Vendor Advisory: https://github.com/goauthentik/authentik/security/advisories/GHSA-c78c-2r9w-p7x4

Restart Required: Yes

Instructions:

1. Backup your authentik configuration and database. 2. Update to version 2024.2.4, 2024.4.2, or 2024.6.0 using your deployment method (Docker, Kubernetes, etc.). 3. Restart the authentik services. 4. Verify the update was successful.

🔧 Temporary Workarounds

Restrict API Access

all

Limit network access to authentik API endpoints to trusted IP addresses only

Use firewall rules to restrict access to authentik API ports (typically 9000)

Disable Unnecessary API Tokens

all

Review and remove any unnecessary API access tokens

Review authentik admin interface for active API tokens and remove unused ones

🧯 If You Can't Patch

  • Implement strict network segmentation to isolate authentik from untrusted networks
  • Enable detailed logging and monitoring for suspicious API token usage and privilege escalation attempts

🔍 How to Verify

Check if Vulnerable:

Check authentik version via admin interface or API. If version is below 2024.2.4, 2024.4.2, or 2024.6.0, it is vulnerable.

Check Version:

docker exec authentik authentik version (for Docker) or check admin interface at /if/admin/#/admin/overview

Verify Fix Applied:

Confirm version is 2024.2.4, 2024.4.2, or 2024.6.0 or higher. Test API token functionality to ensure proper access controls are enforced.

📡 Detection & Monitoring

Log Indicators:

  • Unusual API token usage patterns
  • Multiple failed authentication attempts followed by successful admin access
  • User privilege escalation events

Network Indicators:

  • Unusual API requests to token endpoints
  • Requests from unexpected IP addresses to admin endpoints

SIEM Query:

source="authentik" AND (event="token_created" OR event="user_permission_changed") | stats count by user, src_ip

🔗 References

📤 Share & Export