CVE-2025-46599 Overview
CVE-2025-46599 is an Insecure Default Configuration vulnerability affecting CNCF K3s versions 1.32 before 1.32.4-rc1+k3s1. The vulnerability stems from an unintended Kubernetes kubelet configuration change that, in certain situations, causes the ReadOnlyPort to be set to port 10255 instead of being disabled. This configuration oversight in the default behavior of K3s online installations can allow unauthenticated access to the kubelet's read-only API endpoint, potentially exposing sensitive credentials and cluster information.
Critical Impact
Unauthenticated network attackers can potentially access sensitive Kubernetes cluster credentials and node information through the exposed kubelet read-only port 10255, compromising cluster security.
Affected Products
- CNCF K3s 1.32 (versions before 1.32.4-rc1+k3s1)
- K3s online installations with default configurations
Discovery Timeline
- April 25, 2025 - CVE-2025-46599 published to NVD
- April 29, 2025 - Last updated in NVD database
Technical Details for CVE-2025-46599
Vulnerability Analysis
The vulnerability exists due to improper handling of the kubelet's ReadOnlyPort configuration parameter in K3s. When K3s marshals the KubeletConfiguration object, the configuration framework omits the ReadOnlyPort field when it is set to 0 (which should indicate disabled). This behavior causes the kubelet to fall back to its default value of 10255, inadvertently enabling unauthenticated access to the read-only API endpoint.
The kubelet read-only port exposes sensitive cluster information including pod specifications, container metrics, node status, and potentially embedded credentials. Attackers with network access to port 10255 can query endpoints like /pods, /spec, and /metrics without any authentication, gaining visibility into the cluster's workloads and configuration.
Root Cause
The root cause is a serialization issue in the Go language's handling of zero-value fields (CWE-1188: Insecure Default Initialization of Resource). When the KubeletConfiguration struct is marshaled to YAML or JSON, Go's standard behavior omits fields with zero values unless explicitly tagged otherwise. Since ReadOnlyPort: 0 was intended to disable the port, but the marshaling process removed this field entirely, the kubelet reverted to its default behavior of listening on port 10255.
Attack Vector
An attacker with network access to the K3s node can exploit this vulnerability by directly querying the kubelet's read-only API on port 10255. The attack requires no authentication or user interaction, making it straightforward to exploit in environments where the port is network-accessible.
The following patch demonstrates how the K3s maintainers addressed this issue by setting the read-only-port via CLI flag instead of relying on the configuration struct:
argsMap := map[string]string{
"config-dir": cfg.KubeletConfigDir,
"kubeconfig": cfg.KubeConfigKubelet,
+ // note: KubeletConfiguration will omit this field when marshalling if it is set to 0, so we set it via CLI
+ // https://github.com/k3s-io/k3s/issues/12164
+ "read-only-port": "0",
}
if cfg.RootDir != "" {
Source: GitHub Commit Details
The original vulnerable configuration in pkg/daemons/agent/agent.go relied on setting the value in the struct:
NodeStatusReportFrequency: metav1.Duration{Duration: time.Minute * 5},
NodeStatusUpdateFrequency: metav1.Duration{Duration: time.Second * 10},
ProtectKernelDefaults: cfg.ProtectKernelDefaults,
- ReadOnlyPort: 0,
RuntimeRequestTimeout: metav1.Duration{Duration: time.Minute * 2},
StreamingConnectionIdleTimeout: metav1.Duration{Duration: time.Hour * 4},
SyncFrequency: metav1.Duration{Duration: time.Minute},
Source: GitHub Commit Details
Detection Methods for CVE-2025-46599
Indicators of Compromise
- Unexpected network connections to port 10255 on K3s nodes
- HTTP requests to kubelet read-only API endpoints (/pods, /spec, /metrics, /healthz)
- Reconnaissance activity targeting Kubernetes infrastructure from external IP addresses
- Unusual data exfiltration patterns from node IPs on port 10255
Detection Strategies
- Monitor network traffic for connections to port 10255 on K3s nodes, especially from untrusted sources
- Implement network security group rules to alert on any inbound traffic to port 10255
- Use Kubernetes audit logging to detect unusual API access patterns that may indicate credential compromise
- Deploy SentinelOne Kubernetes Sentinel for real-time container and cluster security monitoring
Monitoring Recommendations
- Configure network intrusion detection systems to alert on port 10255 traffic
- Implement regular configuration audits to verify kubelet read-only port is disabled
- Use netstat or ss commands to verify port 10255 is not listening on K3s nodes
- Enable SentinelOne Cloud Workload Protection for comprehensive Kubernetes security visibility
How to Mitigate CVE-2025-46599
Immediate Actions Required
- Upgrade K3s to version 1.32.4-rc1+k3s1 or later immediately
- Verify that port 10255 is not accessible by running netstat -tlnp | grep 10255 on K3s nodes
- Implement network firewall rules to block external access to port 10255
- Audit cluster credentials and secrets for potential exposure
- Review access logs for any suspicious queries to kubelet endpoints
Patch Information
The K3s maintainers have addressed this vulnerability in version 1.32.4-rc1+k3s1. The fix changes how the read-only-port parameter is configured, using a CLI flag instead of the configuration struct to ensure the zero value is properly respected. Review the GitHub Version Comparison for complete patch details, and the GitHub Issue Tracker for additional context.
Workarounds
- Explicitly set --read-only-port=0 in kubelet arguments if unable to upgrade immediately
- Configure network policies or firewall rules to block all traffic to port 10255
- Use Kubernetes NetworkPolicies to restrict pod-to-node communication on sensitive ports
- Consult the Google Cloud Documentation for additional guidance on disabling the kubelet read-only port
# Verify kubelet read-only port is disabled
kubectl get --raw /api/v1/nodes/<node-name>/proxy/configz | jq '.kubeletconfig.readOnlyPort'
# Check if port 10255 is listening on K3s nodes
netstat -tlnp | grep 10255
# Block port 10255 with iptables (temporary workaround)
iptables -A INPUT -p tcp --dport 10255 -j DROP
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

