VDB
Sign up
HIGH8.8

GHSA-m3c6-2p7h-cfr3

KubeEdge: ConfigUpdateJob updateFields enables remote shell injection and code execution on edge nodes

Quick fix

GHSA-m3c6-2p7h-cfr3 — github.com/kubeedge/kubeedge: upgrade to the fixed version with the command below.

go get github.com/kubeedge/kubeedge@v1.21.2

Details

## Description

KubeEdge ConfigUpdateJob processing was vulnerable to command injection on edge nodes.

The `updateFields` values from a ConfigUpdateJob were concatenated into a command string and executed through a system shell. An authenticated user with sufficient permissions to create or update ConfigUpdateJob resources could include shell metacharacters in the supplied configuration fields and cause unintended commands to be executed on targeted edge nodes.

## Impact

Successful exploitation could allow an authenticated attacker to execute arbitrary commands on affected edge nodes with the privileges of the KubeEdge process handling the ConfigUpdateJob.

The attacker must already have permission to create or modify ConfigUpdateJob resources and target an enrolled edge node.

## Patches

The fix removes shell-based command construction and invokes `keadm config-update` using structured command arguments.

The complete `--set` value is passed as a single literal argument, preventing shell metacharacters from being interpreted as commands.

Fixes are planned for the following maintained releases:

* v1.23.1 * v1.22.2 * v1.21.2

## Workarounds

Until a patched release is available:

* restrict RBAC permissions for creating or modifying ConfigUpdateJob resources; * allow only trusted administrators to submit configuration update jobs; * avoid using ConfigUpdateJob in environments where its input cannot be fully trusted; * monitor ConfigUpdateJob resources and edge-node process activity for unexpected commands or changes.

## Credits

KubeEdge thanks Sang-Hoon Choi ([KoreaSecurity](https://github.com/KoreaSecurity), Sejong University) for responsibly reporting this issue and for coordinating with the KubeEdge maintainers through the security disclosure process.

Are you affected?

Enter the version of the package you're using.

Affected packages

Go/github.com/kubeedge/kubeedge
Introduced in: 1.21.0Fixed in: 1.21.2
Fixgo get github.com/kubeedge/kubeedge@v1.21.2
Go/github.com/kubeedge/kubeedge
Introduced in: 1.22.0Fixed in: 1.22.2
Fixgo get github.com/kubeedge/kubeedge@v1.22.2
Go/github.com/kubeedge/kubeedge
Introduced in: 1.23.0Fixed in: 1.23.1
Fixgo get github.com/kubeedge/kubeedge@v1.23.1

References