CVE-2023-36456

8.3 HIGH

📋 TL;DR

This vulnerability in authentik allows attackers to spoof IP addresses by manipulating X-Forwarded-For and X-Real-IP headers. It affects authentik deployments without reverse proxies, enabling IP bypass in authentication flows, log manipulation, and downstream application impact. Only setups directly accessible to users without reverse proxy protection are vulnerable.

💻 Affected Systems

Products:
  • authentik
Versions: All versions prior to 2023.4.3 and 2023.5.5
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects authentik setups directly accessible by users without a reverse proxy. Systems behind properly configured reverse proxies are not vulnerable.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete authentication bypass allowing unauthorized access to protected systems, including bypassing 2FA when IP-based policies are used.

🟠

Likely Case

IP spoofing leading to inaccurate logs, potential bypass of IP-based restrictions in custom flows, and downstream application impact.

🟢

If Mitigated

Minimal impact if reverse proxy properly validates headers or IP-based policies are not used.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Exploitation requires direct access to authentik without reverse proxy. Simple header manipulation is sufficient.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 2023.4.3 or 2023.5.5

Vendor Advisory: https://github.com/goauthentik/authentik/security/advisories/GHSA-cmxp-jcw7-jjjv

Restart Required: Yes

Instructions:

1. Update authentik to version 2023.4.3 or 2023.5.5. 2. Restart authentik services. 3. Verify the fix by checking version and testing header validation.

🔧 Temporary Workarounds

Deploy behind reverse proxy

all

Place authentik behind a properly configured reverse proxy that validates and strips untrusted X-Forwarded-For and X-Real-IP headers.

Disable IP-based policies

all

Temporarily disable any authentication flows or policies that rely on IP address verification.

🧯 If You Can't Patch

  • Deploy authentik behind a reverse proxy with proper header validation
  • Audit and disable all IP-based authentication policies and flows

🔍 How to Verify

Check if Vulnerable:

Check if authentik version is below 2023.4.3 or 2023.5.5 and is directly accessible without reverse proxy.

Check Version:

Check authentik version in admin interface or via API endpoint /api/v3/core/version/

Verify Fix Applied:

After patching, test that X-Forwarded-For and X-Real-IP headers from untrusted sources are properly validated or ignored.

📡 Detection & Monitoring

Log Indicators:

  • Unexpected IP addresses in authentik logs
  • Authentication attempts from IPs that shouldn't have access

Network Indicators:

  • Direct HTTP requests to authentik with X-Forwarded-For or X-Real-IP headers
  • Unusual authentication patterns

SIEM Query:

source="authentik" AND (http_header="X-Forwarded-For" OR http_header="X-Real-IP") AND NOT src_ip IN [trusted_proxy_ips]

🔗 References

📤 Share & Export