CVE-2020-8558 Overview
A security vulnerability exists in the Kubernetes Kubelet and kube-proxy components that allows adjacent hosts to reach TCP and UDP services bound to 127.0.0.1 running on the node or in the node's network namespace. Services bound to localhost are generally expected to be reachable only by other processes on the same host. However, due to this defect, these services could be accessible by other hosts on the same LAN as the node, or by containers running on the same node as the service.
Critical Impact
Adjacent network attackers can access localhost-bound services, potentially exposing sensitive internal APIs, management interfaces, and services designed for local-only access, leading to unauthorized data access, privilege escalation, or cluster compromise.
Affected Products
- Kubernetes versions 1.1.0 through 1.16.10
- Kubernetes versions 1.17.0 through 1.17.6
- Kubernetes versions 1.18.0 through 1.18.3
Discovery Timeline
- 2020-07-27 - CVE CVE-2020-8558 published to NVD
- 2024-11-21 - Last updated in NVD database
Technical Details for CVE-2020-8558
Vulnerability Analysis
This vulnerability stems from improper network isolation in the Kubelet and kube-proxy components. When services bind to 127.0.0.1 (localhost), they expect to only receive connections from processes running on the same host. The vulnerability breaks this fundamental security assumption by allowing network packets from adjacent hosts on the same LAN segment or from containers running on the same node to reach these localhost-bound services.
The attack requires the attacker to be on the same network segment as the vulnerable Kubernetes node, making this an adjacent network (AV:A) attack. No privileges or user interaction are required to exploit this vulnerability, and successful exploitation can result in complete compromise of confidentiality, integrity, and availability of the affected services.
Root Cause
The root cause of CVE-2020-8558 is classified under CWE-420 (Unprotected Alternate Channel). The Kubelet and kube-proxy components fail to properly enforce network isolation boundaries, creating an unprotected alternate channel through which localhost-bound services can be accessed. This allows network traffic that should be dropped at the network boundary to reach services that were designed for local-only access.
Attack Vector
The vulnerability exploits improper network packet handling in the affected Kubernetes components. An attacker positioned on the same local area network as a vulnerable Kubernetes node can craft network packets destined for localhost-bound services on that node. Due to the improper routing and filtering behavior in Kubelet and kube-proxy, these packets are incorrectly delivered to services bound to 127.0.0.1.
Potential attack scenarios include:
- Accessing the Kubelet API if it's bound to localhost
- Reaching internal monitoring or metrics endpoints
- Accessing database services or caches bound to localhost for "security"
- Exploiting any management interface assumed to be localhost-only
Since no code examples are available, readers should refer to the GitHub Kubernetes Issue #92315 for detailed technical information about the vulnerability mechanism.
Detection Methods for CVE-2020-8558
Indicators of Compromise
- Unexpected network connections to localhost-bound services from external IP addresses
- Network traffic originating from other nodes on the LAN targeting port 127.0.0.1:*
- Unusual access patterns to Kubelet API or internal services from container or adjacent host IP ranges
- Log entries showing connections to localhost services with source IPs outside 127.0.0.0/8
Detection Strategies
- Monitor network traffic for packets destined to 127.0.0.1 that originate from non-local sources
- Implement network flow analysis to detect cross-node access to localhost-bound services
- Review Kubernetes audit logs for unexpected API access patterns from container or adjacent network IPs
- Deploy network sensors to detect anomalous traffic patterns within the cluster LAN segment
Monitoring Recommendations
- Enable detailed logging on all localhost-bound services to track connection source IPs
- Implement network segmentation monitoring to detect violations of expected traffic patterns
- Configure alerts for any connections to Kubelet API or sensitive services from unexpected sources
- Regularly audit running services bound to localhost and assess their exposure risk
How to Mitigate CVE-2020-8558
Immediate Actions Required
- Upgrade Kubernetes to version 1.16.11, 1.17.7, 1.18.4, or later which contain the fix
- Audit all services bound to 127.0.0.1 on Kubernetes nodes for sensitive functionality
- Implement network-level controls to restrict access between nodes on the same LAN segment
- Review and apply the principle of least privilege for all internal services
Patch Information
Kubernetes has released patched versions that address this vulnerability. Users should upgrade to the following minimum versions:
- Version 1.16.11 or later for the 1.16.x branch
- Version 1.17.7 or later for the 1.17.x branch
- Version 1.18.4 or later for the 1.18.x branch
For detailed patch information, refer to the Kubernetes Security Announcement and the GitHub Kubernetes Issue #92315.
Workarounds
- Set net.ipv4.conf.all.route_localnet=0 on Kubernetes nodes to prevent routing of localhost traffic
- Implement strict iptables rules to drop packets destined for localhost from non-local sources
- Use network policies to restrict pod-to-pod and node-to-node communication
- Isolate Kubernetes nodes on separate network segments with strict firewall controls
# Configuration example to mitigate CVE-2020-8558
# Disable route_localnet to prevent localhost routing bypass
sysctl -w net.ipv4.conf.all.route_localnet=0
sysctl -w net.ipv4.conf.default.route_localnet=0
# Add iptables rule to drop packets to localhost from external sources
iptables -A INPUT -d 127.0.0.0/8 ! -i lo -j DROP
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

