CVE-2023-48312

9.8 CRITICAL

📋 TL;DR

CVE-2023-48312 is a privilege escalation vulnerability in capsule-proxy that allows unauthenticated users to bypass token review mechanisms and interact with the Kubernetes API Server. This affects clusters with anonymous-auth disabled in the Kubernetes API Server configuration. The vulnerability cannot be exploited if relying solely on client certificate authentication.

💻 Affected Systems

Products:
  • capsule-proxy
Versions: All versions before 0.4.6
Operating Systems: All platforms running capsule-proxy
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects clusters with Kubernetes API Server anonymous-auth setting disabled (set to false). Not exploitable if using only client certificate authentication.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers gain full administrative access to the Kubernetes cluster, allowing them to deploy malicious pods, exfiltrate sensitive data, or disrupt cluster operations.

🟠

Likely Case

Unauthorized users escalate privileges to interact with Kubernetes resources they shouldn't have access to, potentially compromising tenant isolation in multi-tenant environments.

🟢

If Mitigated

If proper network segmentation and authentication controls are in place, impact is limited to unauthorized API calls within the allowed network perimeter.

🌐 Internet-Facing: HIGH - If capsule-proxy is exposed to the internet, attackers can directly exploit this without authentication.
🏢 Internal Only: HIGH - Even internally, any user with network access to capsule-proxy can exploit this vulnerability.

🎯 Exploit Status

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

Exploitation requires sending requests to capsule-proxy without proper authentication tokens, taking advantage of missing TokenReview result validation.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 0.4.6

Vendor Advisory: https://github.com/projectcapsule/capsule-proxy/security/advisories/GHSA-fpvw-6m5v-hqfp

Restart Required: Yes

Instructions:

1. Backup current configuration. 2. Update capsule-proxy to version 0.4.6 or later using your package manager or container registry. 3. Restart the capsule-proxy service. 4. Verify the new version is running.

🔧 Temporary Workarounds

Enable anonymous-auth in Kubernetes API Server

linux

Temporarily enable anonymous authentication in the Kubernetes API Server configuration to prevent exploitation

kubectl edit configmap -n kube-system kube-apiserver
Set --anonymous-auth=true in the configuration

Network isolation

linux

Restrict network access to capsule-proxy to only trusted sources

iptables -A INPUT -p tcp --dport <capsule-proxy-port> -s <trusted-ip> -j ACCEPT
iptables -A INPUT -p tcp --dport <capsule-proxy-port> -j DROP

🧯 If You Can't Patch

  • Implement strict network access controls to limit who can reach capsule-proxy endpoints
  • Enable client certificate authentication exclusively and disable token-based authentication

🔍 How to Verify

Check if Vulnerable:

Check capsule-proxy version and verify if running version <0.4.6. Also check Kubernetes API Server configuration for anonymous-auth=false.

Check Version:

capsule-proxy --version or check container image tag

Verify Fix Applied:

Confirm capsule-proxy version is 0.4.6 or later and test that unauthenticated requests are properly rejected.

📡 Detection & Monitoring

Log Indicators:

  • Unauthorized access attempts to capsule-proxy
  • Failed TokenReview validations
  • Unexpected API calls from unauthenticated sources

Network Indicators:

  • Unusual traffic patterns to capsule-proxy from unexpected sources
  • API requests without proper authentication headers

SIEM Query:

source="capsule-proxy" AND (event="unauthorized" OR event="authentication_failed")

🔗 References

📤 Share & Export