KubeEdge: Command Injection in NodeUpgradeJob - RCE on edge nodes via v1alpha2 APIGHSA-5jpj-293f-rhvj
HIGHFix: kubeedge/kubeedge#7028GHSA-5jpj-293f-rhvj is a high-severity (CVSS 8.8) OS Command Injection vulnerability in github.com/kubeedge/kubeedge. A fix is available for github.com/kubeedge/kubeedge — see the affected versions and patch details below.
Exploitation Status
No confirmed exploitation observed yet
- A successful exploit gives an attacker total control of the affected component, not partial access.
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for GHSA-5jpj-293f-rhvj.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
GHSA-5jpj-293f-rhvj by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.
Where this sits among everything scored
Of 394,803 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
github.com/kubeedge/kubeedge🐹github.com/kubeedge/kubeedge🐹github.com/kubeedge/kubeedgeReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.
Description
Impact
The KubeEdge NodeUpgradeJob handler constructed the keadm upgrade edge command by concatenating the user-controlled spec.version and spec.image fields into a shell command.
An authenticated user with permission to create or update NodeUpgradeJob resources through the v1alpha2 API could include shell metacharacters in either field. When the upgrade job was processed, the injected command could be executed on the targeted edge node with the privileges available to the upgrade process.
Successful exploitation could result in arbitrary command execution and compromise the confidentiality, integrity, and availability of the affected edge node.
Patches
The fix removes shell-based command construction and invokes keadm using a structured argument list through exec.Command.
The version and image values are passed as separate literal arguments and are no longer interpreted by a command shell.
The fixed versions:
- KubeEdge v1.23.1
- KubeEdge v1.22.2
- KubeEdge v1.21.2
Workarounds
Until a patched version is available:
- restrict permission to create or update
NodeUpgradeJobresources to trusted administrators; - do not allow untrusted users or tenants to control the
spec.versionorspec.imagefields; - avoid using NodeUpgradeJob-based edge upgrades in environments where these fields may be influenced by untrusted users.
Credits
KubeEdge thanks Sang-Hoon Choi (KoreaSecurity, Sejong University) for responsibly reporting this issue and for coordinating with the KubeEdge maintainers through the security disclosure process.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | github.com/kubeedge/kubeedge | ≥ 1.12.0&&< 1.21.2 | 1.21.2go get github.com/kubeedge/kubeedge@v1.21.2 |
| 🐹Go | github.com/kubeedge/kubeedge | ≥ 1.22.0&&< 1.22.2 | 1.22.2go get github.com/kubeedge/kubeedge@v1.22.2 |
| 🐹Go | github.com/kubeedge/kubeedge | ≥ 1.23.0&&< 1.23.1 | 1.23.1go get github.com/kubeedge/kubeedge@v1.23.1 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/kubeedge/kubeedge, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update github.com/kubeedge/kubeedge to 1.21.2 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-5jpj-293f-rhvj is resolved across your whole dependency graph.
Workarounds
Stop passing untrusted input into the interpreter or shell: call the affected binary with an argument array rather than a composed command string, reject anything outside a strict allowlist of expected values, and run the component under an account that cannot reach beyond the work it legitimately does.
Frequently Asked Questions
Is GHSA-5jpj-293f-rhvj in your dependencies?
Find it across Go, including transitive dependencies.