CVE-2026-73517: KubeSphere Command Injection via Terminal File Download
KubeSphere 4.0.0 through 4.1.3 contains a command injection vulnerability in the terminal v1alpha2 file download endpoint where the path query parameter is inserted via fmt.Sprintf into sh -c tar commands executed inside the target container, and the DownloadFile handler fails to perform its own pods/exec authorization check. Attackers with only pod get permission, including built-in read-only project-viewer, workspace-viewer and cluster-viewer roles, can supply shell metacharacters in the path parameter to execute arbitrary commands inside any viewable container without holding pod exec permission.
Affected Software
Event History
Frequently Asked Questions
Which users can exploit this issue?
Any user with pod get permission for a container they can view may be able to exploit it. This includes the built-in read-only project-viewer, workspace-viewer, and cluster-viewer roles, even though those roles do not grant pod exec permission.
What access and interaction does exploitation require?
The attacker needs network access to the affected KubeSphere endpoint and pod get permission for a viewable target container. No user interaction or pod exec permission is required.
What can an attacker do after successful exploitation?
An attacker can inject shell metacharacters through the file-download path parameter to execute arbitrary commands inside any container they are permitted to view. The vulnerable handler runs tar through sh -c and does not independently enforce pods/exec authorization.
How can I determine whether an environment is affected?
KubeSphere versions 4.0.0 through 4.1.3 are affected. Review whether users or service accounts with pod get access, including read-only viewer roles, can reach the terminal v1alpha2 file download functionality.