CVE-2023-1260

8.0 HIGH

📋 TL;DR

CVE-2023-1260 is an authentication bypass vulnerability in Kubernetes kube-apiserver that allows authenticated attackers with specific permissions to bypass Security Context Constraints (SCC) admission restrictions. This could enable attackers to gain control of privileged pods they shouldn't have access to. Organizations running vulnerable Kubernetes versions with RBAC configurations granting 'update' or 'patch' permissions on pods/ephemeralcontainers subresource are affected.

💻 Affected Systems

Products:
  • Kubernetes kube-apiserver
Versions: Kubernetes versions prior to 1.24.15, 1.25.11, 1.26.6, 1.27.3
Operating Systems: Linux distributions running Kubernetes
Default Config Vulnerable: ✅ No
Notes: Requires RBAC configuration granting 'update' or 'patch' permissions on pods/ephemeralcontainers subresource. Not vulnerable in default configurations.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers gain full control of privileged pods, potentially leading to cluster-wide compromise, data exfiltration, or lateral movement to other critical systems.

🟠

Likely Case

Privilege escalation within the Kubernetes cluster allowing unauthorized access to sensitive workloads or data.

🟢

If Mitigated

Limited impact due to proper RBAC restrictions and SCC policies preventing unauthorized pod modifications.

🌐 Internet-Facing: MEDIUM - Requires authenticated access but could be exploited if API server is exposed to internet with vulnerable configurations.
🏢 Internal Only: HIGH - Internal attackers or compromised accounts with appropriate permissions can exploit this to escalate privileges within the cluster.

🎯 Exploit Status

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

Requires authenticated access with specific permissions and knowledge of Kubernetes API. Attackers need to create or patch pods they have access to.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Kubernetes 1.24.15, 1.25.11, 1.26.6, 1.27.3 or later

Vendor Advisory: https://access.redhat.com/errata/RHSA-2023:3976

Restart Required: Yes

Instructions:

1. Update kube-apiserver to patched version. 2. Restart kube-apiserver pods. 3. Verify all control plane components are running patched versions.

🔧 Temporary Workarounds

RBAC Restriction

linux

Remove or restrict 'update' and 'patch' permissions on pods/ephemeralcontainers subresource for non-administrative users

kubectl edit clusterrole <role-name>
Remove verbs: ['update', 'patch'] from pods/ephemeralcontainers resource

SCC Policy Enforcement

linux

Implement strict Security Context Constraints to limit pod privilege escalation

oc edit scc restricted
Set allowPrivilegeEscalation: false

🧯 If You Can't Patch

  • Review and restrict RBAC permissions for pods/ephemeralcontainers subresource
  • Implement network policies to limit access to kube-apiserver and monitor for suspicious pod modifications

🔍 How to Verify

Check if Vulnerable:

Check Kubernetes version: kubectl version --short | grep Server

Check Version:

kubectl version --short | grep -i server

Verify Fix Applied:

Verify kube-apiserver version is 1.24.15+, 1.25.11+, 1.26.6+, or 1.27.3+

📡 Detection & Monitoring

Log Indicators:

  • Unauthorized pod/ephemeralcontainers update/patch attempts
  • SCC admission controller denials for privileged pod creations

Network Indicators:

  • Unusual API calls to pods/ephemeralcontainers endpoint from non-admin users

SIEM Query:

source="kube-apiserver" AND (verb="update" OR verb="patch") AND resource="pods/ephemeralcontainers" AND user!="system:serviceaccount:kube-system:*"

🔗 References

📤 Share & Export