CVE-2020-8559 Overview
CVE-2020-8559 is an unvalidated redirect vulnerability in the Kubernetes kube-apiserver that affects multiple versions of Kubernetes. The vulnerability exists in proxied upgrade requests, where an attacker who has already compromised a node can exploit the unvalidated redirect to escalate privileges from node-level access to full cluster compromise.
Critical Impact
An attacker with node-level access can leverage this vulnerability to escalate privileges and gain complete control over the entire Kubernetes cluster, potentially compromising all workloads and sensitive data across the cluster.
Affected Products
- Kubernetes versions v1.6 through v1.15 (all releases)
- Kubernetes versions prior to v1.16.13
- Kubernetes versions prior to v1.17.9
- Kubernetes versions prior to v1.18.6
Discovery Timeline
- 2020-07-22 - CVE-2020-8559 published to NVD
- 2024-11-21 - Last updated in NVD database
Technical Details for CVE-2020-8559
Vulnerability Analysis
This vulnerability stems from an unvalidated redirect condition (CWE-601) in the Kubernetes kube-apiserver's handling of proxied upgrade requests. When the kube-apiserver proxies certain requests to backend services or nodes, it fails to properly validate redirect responses. This allows an attacker who has compromised a node to intercept and manipulate these redirect responses, ultimately tricking the kube-apiserver into making requests to arbitrary destinations.
The attack scenario requires the attacker to first gain control of a node within the Kubernetes cluster. Once node-level access is achieved, the attacker can intercept proxied requests from the kube-apiserver and respond with malicious redirect responses. Because the kube-apiserver does not validate these redirects, it follows them blindly, potentially sending authenticated requests to attacker-controlled endpoints or other cluster components.
Root Cause
The root cause of this vulnerability is the lack of proper validation of redirect responses in the kube-apiserver's proxy handling code. When processing upgrade requests (such as those used for kubectl exec, kubectl attach, or other streaming connections), the kube-apiserver trusts redirect responses from nodes without verifying that the redirect target is a legitimate and expected destination. This trust relationship allows a compromised node to abuse the redirect mechanism.
Attack Vector
The attack requires network access and involves the following sequence:
- The attacker first compromises a Kubernetes node through a separate vulnerability or misconfiguration
- With node-level access, the attacker positions themselves to intercept communications from the kube-apiserver
- When a legitimate user or service initiates a proxied upgrade request (e.g., kubectl exec), the attacker intercepts the request at the node level
- The attacker responds with a crafted redirect response pointing to a sensitive cluster endpoint or another node
- The kube-apiserver follows the redirect, sending authenticated requests to the attacker-specified target
- This allows the attacker to access resources and execute commands beyond their initial node-level scope, achieving full cluster compromise
The vulnerability requires high privileges (node compromise) and user interaction (a legitimate user must trigger a proxied request), but the potential impact is severe as it enables complete cluster takeover.
Detection Methods for CVE-2020-8559
Indicators of Compromise
- Unusual redirect responses in kube-apiserver proxy logs indicating unexpected destination targets
- Anomalous network traffic patterns from the kube-apiserver to unexpected endpoints within the cluster
- Evidence of node compromise such as unauthorized processes, modified kubelet configurations, or suspicious container activity
- Unexpected kubectl exec or kubectl attach session behaviors or failures
Detection Strategies
- Monitor kube-apiserver audit logs for proxied requests that result in redirects to unexpected destinations
- Implement network monitoring to detect unusual traffic patterns from the control plane to worker nodes
- Deploy runtime security monitoring on all nodes to detect signs of node compromise
- Review Kubernetes audit logs for suspicious exec, attach, and portforward operations
Monitoring Recommendations
- Enable comprehensive Kubernetes audit logging with focus on proxy-related events and exec/attach operations
- Implement alerting on kube-apiserver errors or warnings related to redirect handling
- Deploy network segmentation and monitor east-west traffic within the cluster for anomalies
- Use SentinelOne Singularity for Cloud to continuously monitor Kubernetes workloads and detect suspicious behavior indicative of compromise
How to Mitigate CVE-2020-8559
Immediate Actions Required
- Upgrade Kubernetes to version v1.16.13, v1.17.9, v1.18.6, or later immediately
- Review all nodes for signs of compromise before and after patching
- Implement network policies to restrict communication paths within the cluster
- Audit cluster access and ensure least-privilege principles are enforced
Patch Information
Kubernetes has released patched versions that address this vulnerability. Organizations should upgrade to the following minimum versions:
- Kubernetes v1.16.x users: Upgrade to v1.16.13 or later
- Kubernetes v1.17.x users: Upgrade to v1.17.9 or later
- Kubernetes v1.18.x users: Upgrade to v1.18.6 or later
For detailed patch information, refer to the Kubernetes GitHub Issue #92914 and the Kubernetes Security Announcement.
Workarounds
- Implement strict network policies to limit which endpoints the kube-apiserver can reach
- Restrict access to kubectl exec, kubectl attach, and similar privileged operations using RBAC
- Deploy additional monitoring on nodes to detect and respond to compromise attempts quickly
- Consider using admission controllers to limit the scope and frequency of proxied requests
# Example: Restrict exec/attach permissions via RBAC
# Create a ClusterRole that denies exec access
kubectl create clusterrole no-exec \
--verb=create \
--resource=pods/exec \
--dry-run=client -o yaml | \
sed 's/verbs:/verbs: []/g' > restricted-exec-role.yaml
# Apply network policy to restrict kube-apiserver egress
kubectl apply -f - <<EOF
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: restrict-apiserver-egress
namespace: kube-system
spec:
podSelector:
matchLabels:
component: kube-apiserver
policyTypes:
- Egress
egress:
- to:
- namespaceSelector: {}
ports:
- protocol: TCP
port: 10250
EOF
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

