Kubernetes flaws could lead to remote code execution on Windows endpoints

Researchers discovered three security flaws in Kubernetes that can lead to remote code execution on Windows endpoints.

Akamai researchers recently discovered a high-severity vulnerability in Kubernetes tracked as CVE-2023-3676 (CVSS 8.8). This identification of this issue led to the discovery of two more vulnerabilities tracked as CVE-2023-3893, and CVE-2023-3955 (CVSS 8.8). All three vulnerabilities were caused by insecure function call and the lack of user input sanitization.

The vulnerability can be exploited to gain remote code execution with SYSTEM privileges on all Windows endpoints within a Kubernetes cluster. An attacker can trigger the issue by applying a malicious YAML file on the cluster.

The vulnerability impacts default installations of Kubernetes and was tested against both on-prem deployments and Azure Kubernetes Service.

The researchers noticed that the presence of “exec.Command” combined with unsanitized user-supplied could have created the condition for a command injection.

PowerShell allows users to evaluate values inside strings before they are used.

Any PowerShell command can be inserted between the parentheses and will be evaluated, including $(Start-Process cmd), $(Invoke-Expression exp), and other PowerShell treats.

An attacker can abuse the subPath subproperty in a YAML file to gain access to privileged data outside of the container. The subPath evaluation can be abused to reach the vulnerable code and execute arbitrary command with SYSTEM privileges (kubelet’s own context) from remote nodes, and gain control over all Windows nodes in the cluster

“CVE-2023-3676 requires low privileges and, therefore, sets a low bar for attackers: All they need to have is access to a node and apply privileges. As we discussed in this blog post, successful exploitation of this vulnerability will lead to remote code execution on any Windows node on the machine with SYSTEM privileges.” reads the advisory published by Akamai. “High impact coupled with ease of exploitation usually means that there is a higher chance of seeing this attack (and similar attacks) on organizations.

Akamai provided a proof-of-concept YAML file as well as an OPA rule for blocking this vulnerability.

Below is the disclosure timeline:

  • 07/13/2023 — Vulnerability disclosed to Kubernetes team.
  • 07/19/2023 — CVEs assigned by Kubernetes team
  • 08/23/2023 — Kubernetes released the CVE fixes
  • 09/13/2023 — blog post published

Follow me on Twitter: @securityaffairs and Facebook and Mastodon

Pierluigi Paganini

(SecurityAffairs – hacking, RCE)

Pierluigi Paganini

Pierluigi Paganini is member of the ENISA (European Union Agency for Network and Information Security) Threat Landscape Stakeholder Group and Cyber G7 Group, he is also a Security Evangelist, Security Analyst and Freelance Writer. Editor-in-Chief at "Cyber Defense Magazine", Pierluigi is a cyber security expert with over 20 years experience in the field, he is Certified Ethical Hacker at EC Council in London. The passion for writing and a strong belief that security is founded on sharing and awareness led Pierluigi to find the security blog "Security Affairs" recently named a Top National Security Resource for US. Pierluigi is a member of the "The Hacker News" team and he is a writer for some major publications in the field such as Cyber War Zone, ICTTF, Infosec Island, Infosec Institute, The Hacker News Magazine and for many other Security magazines. Author of the Books "The Deep Dark Web" and “Digital Virtual Currency and Bitcoin”.

Recent Posts

Turla APT used two new backdoors to infiltrate a European ministry of foreign affairs

Russia-linked Turla APT allegedly used two new backdoors, named Lunar malware and LunarMail, to target…

7 hours ago

City of Wichita disclosed a data breach after the recent ransomware attack

The City of Wichita disclosed a data breach after the ransomware attack that hit the…

15 hours ago

CISA adds D-Link DIR router flaws to its Known Exploited Vulnerabilities catalog

CISA adds two D-Link DIR-600 and DIR-605 router vulnerabilities to its Known Exploited Vulnerabilities catalog. The…

18 hours ago

CISA adds Google Chrome zero-days to its Known Exploited Vulnerabilities catalog

CISA adds two Chrome zero-day vulnerabilities to its Known Exploited Vulnerabilities catalog. The U.S. Cybersecurity…

20 hours ago

North Korea-linked Kimsuky APT attack targets victims via Messenger

North Korea-linked Kimsuky APT group employs rogue Facebook accounts to target victims via Messenger and deliver malware.…

21 hours ago

Electronic prescription provider MediSecure impacted by a ransomware attack

Electronic prescription provider MediSecure in Australia suffered a ransomware attack likely originate from a third-party…

1 day ago

This website uses cookies.