Kubernetes Vulnerability: Command Injection Attacks Threaten the Security of Your Clusters

Citizen
Citizen Sec,

A recently discovered vulnerability in Kubernetes has raised serious concerns in the cybersecurity community. Akamai researcher Tomer Peled found a flaw in the Kubernetes project called git-sync, which allows attackers to execute command injection attacks.
This vulnerability affects standard Kubernetes installations on various platforms such as Amazon EKS, Azure AKS, and Google GKE. It will be presented at the DEF CON 2024 conference.
The vulnerability is related to the git-sync project, which is used to synchronize a Kubernetes container with a Git repository. This synchronization process, intended for automatic updates, inadvertently opens a broad attack surface due to insufficient input validation.
Attackers can exploit this vulnerability by applying a malicious YAML file to the cluster, a low-privileged operation. This allows them to execute arbitrary commands or steal data from the container.
How to Protect Against This Threat
Two critical parameters, GITSYNC_GIT and GITSYNC_PASSWORD_FILE, are particularly vulnerable. GITSYNC_GIT allows specifying a command to be executed, which can be replaced with a malicious executable for code execution. GITSYNC_PASSWORD_FILE can be manipulated to extract sensitive information, such as access tokens, from the container.
This vulnerability could lead to severe consequences, such as unauthorized command execution and data theft. Attackers with minimal privileges can deploy an executable inside the container disguised as git-sync and execute commands under the guise of legitimate operations, bypassing security measures.
Moreover, attackers with editing rights can redirect git-sync to send sensitive files to an external server, potentially compromising the entire Kubernetes cluster.
Despite the severity of the vulnerability, it has not received a CVE identifier, and no official patch has been released. The Kubernetes team has acknowledged the issue but considers editing operations to be highly privileged, so they do not see an immediate need to release a fix. However, the research highlights the need for increased awareness and monitoring of the Kubernetes environment.
To mitigate risks, organizations are advised to strengthen monitoring of outgoing communications from Kubernetes containers, especially those using git-sync. Regular audits of git-sync containers are recommended to ensure they are executing expected commands.
Additionally, implementing Open Policy Agent (OPA) rules can help detect and block potential attack vectors by identifying unauthorized changes in git-sync configurations.
The detection of Cyclops underscores the ongoing threat from groups like Charming Kitten. The development of this malware and the use of the Go language indicate an increase in the attackers' skill levels. Cybersecurity experts hope that by sharing this information, they can improve detection and protection methods to prevent the spread of Cyclops and protect potential targets from future attacks.
You will be interested
Как защитить детей в цифровом мире: почему безопасность в интернете — это важно
Современные дети растут в эпоху цифровых технологий — смартфоны, планшеты, социальные сети и онлайн-игры стали неотъемлемой частью их жизни. Интернет открывает массу возможностей для учёбы, творчества и общения, но вместе с этим приносит и серьёзные риски.

@citizensec
30-05-2025Регламент по использованию корпоративной электронной почты
Правила использования корпоративной почты: что разрешено, что запрещено, меры безопасности и ответственность.

@CitizenSec
19-05-2025Women in cybersecurity from Kazakhstan
The special edition is dedicated to women in cybersecurity who overcome challenges, inspire others, and make the world safer. We share the stories of three professionals, their paths in cybersecurity, career advice, and tips on online security. Learn how to start your journey in cybersecurity and grow in this dynamic field.

@citizensec
03-05-2025Attention to Everyday IT Tools: New Tactic of a Chinese Spy Group
Microsoft Warns: Chinese Spy Group Uses Everyday IT Tools to Hack Networks
@turin.medet
06-03-2025Zebo-0.1.0 and Cometlogger-0.1: Dangerous Programs Stealing Data and Controlling Computers
Experts have discovered two dangerous programs that seem harmless at first. These programs can steal personal data, monitor computer activity, and even take control of the system.

@CitizenSec
26-12-2024Postman Workspaces Expose Over 30,000 API Keys and Sensitive Tokens
Thousands of Postman workspaces accidentally revealed sensitive data such as API keys and access tokens. Learn how to secure your API development environment and protect your organization's data.

@CitizenSec
21-11-2024New SteelFox Trojan mimics software activators, stealing sensitive data and mining cryptocurrency
SteelFox was first identified in August 2023, but its activity has increased markedly. More than 11,000 infection attempts have been recorded in recent months.

@CitizenSec
11-11-2024Critical vulnerability CVE-2024-43093 threatens the security of Android users
This problem allows hackers to gain unauthorized access to important Android system folders.

@CitizenSec
05-11-2024ChatGPT was persuaded to create an exploit by slipping instructions in 16-bit format
A Mozilla researcher has proposed a new way to bypass content filters in large language models (LM) used to prevent abuse.

@CitizenSec
01-11-2024A new tool to bypass cookie encryption in Google Chrome: how does it work and what does it mean for your online security?
Recently, cybersecurity researcher Alexander Hagen has developed a tool that can bypass a new security feature in Google Chrome called App-Bound Encryption.

@CitizenSec
30-10-2024