/

CVE-2026-62371

Severity:

HIGH RISK

(8.8)

OS Command Injection (CWE-78) in KubeEdge NodeUpgrade

CVE-2026-62371

Awaiting Analysis

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78

Impact:

Arbitrary Command Execution

Severity:

HIGH RISK

(8.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

KubeEdge contains an operating system command injection vulnerability in the v1alpha2 NodeUpgradeJob handler. An authenticated user who can create or update these resources may inject shell syntax into version or image fields, causing arbitrary commands to run on targeted edge nodes with the upgrade process's privileges.

Affected context

The vulnerability occurs in KubeEdge deployments that use the v1alpha2 NodeUpgradeJob workflow to upgrade edge nodes. It becomes risky when a user with permission to create or update NodeUpgradeJob resources can control the spec.version or spec.image values and those values are incorporated into an upgrade shell command without adequate argument handling or validation.

Exploit preconditions

  • Attack surface: The NodeUpgradeJob resource creation and update API
  • Required access: Authenticated permission to create or modify v1alpha2 NodeUpgradeJob resources
  • Trigger point: Processing a NodeUpgradeJob that invokes the keadm edge upgrade command
  • Controllable input: The spec.version and spec.image fields
  • Why exploitation is possible: User-controlled values are concatenated into a shell command, allowing shell metacharacters to alter command interpretation

Why this happens

The underlying bug is command construction from untrusted resource fields. Instead of treating version and image values as data passed through a structured process interface, the handler incorporates them into a shell command without reliably separating arguments or enforcing an allowlisted format. This behavior maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command, because attacker-controlled input can influence shell evaluation and execution.

Potential impact

  • Arbitrary commands may execute on targeted edge nodes
  • Node confidentiality may be compromised through unauthorized data access
  • Node integrity may be affected through configuration or workload changes
  • Edge services may be disrupted, causing loss of availability
  • Compromised nodes could support lateral movement or broader cluster impact

General mitigation guidance

Mitigation generally focuses on removing shell interpretation from upgrade workflows and reducing trust in resource fields.

Common defensive patterns include:

  • Invoke upgrade utilities through structured process APIs with discrete argument arrays rather than shell concatenation
  • Validate version and image values against strict syntax rules or approved registries and references
  • Reject shell metacharacters and unexpected delimiters as a secondary input control
  • Apply least-privilege permissions to NodeUpgradeJob creation and update operations
  • Run upgrade processes with minimal operating-system and Kubernetes privileges
  • Separate upgrade authorization from general workload or resource-management permissions
  • Audit and restrict which identities, controllers, and namespaces may initiate node upgrades

How teams detect issues like this

Organizations can look for this class of issue through:

  • Static analysis rules identifying shell execution APIs fed by resource fields or request data
  • Code review checks for string concatenation or interpolation in command construction
  • Policy enforcement requiring structured subprocess invocation and input allowlists
  • Audit-log monitoring for unusual NodeUpgradeJob creation or modification activity
  • Runtime monitoring for unexpected child processes, command interpreters, file changes, or outbound connections from edge upgrade agents
  • Automated security review tools that flag command execution paths involving tainted input

Sources

SourceLink
github.comgithub.com/kubeedge/kubeedge/blob/master/CHANGELOG/CHANGELOG-1.21.md
github.comgithub.com/kubeedge/kubeedge/blob/master/CHANGELOG/CHANGELOG-1.22.md
github.comgithub.com/kubeedge/kubeedge/blob/master/CHANGELOG/CHANGELOG-1.23.md
github.comgithub.com/kubeedge/kubeedge/commit/552af457a4c7ce80ea1678ab5889f475b36ea103
github.comgithub.com/kubeedge/kubeedge/commit/657b745bebcdd7a221eb34c0aac13231ef12c37f
github.comgithub.com/kubeedge/kubeedge/commit/b72db7f8a0f7be23261b4349eab33024b2007df0
github.comgithub.com/kubeedge/kubeedge/pull/7028
github.comgithub.com/kubeedge/kubeedge/pull/7029
github.comgithub.com/kubeedge/kubeedge/pull/7030
github.comgithub.com/kubeedge/kubeedge/releases/tag/v1.21.2
github.comgithub.com/kubeedge/kubeedge/releases/tag/v1.22.2
github.comgithub.com/kubeedge/kubeedge/releases/tag/v1.23.1
github.comgithub.com/kubeedge/kubeedge/security/advisories/GHSA-5jpj-293f-rhvj

Frequently asked

questions

It may be exploitable through KubeEdge's resource-management interface when an attacker can submit or modify a NodeUpgradeJob and the request reaches a vulnerable edge-node upgrade workflow.

The attacker needs authenticated authorization to create or update the affected NodeUpgradeJob resources. The exact scope depends on the deployment's identity, namespace, and admission-control policies.

Avoid shell-based command construction. Pass validated values as separate process arguments, enforce strict formats or approved values, and limit upgrade operations to trusted identities.

Treat resource fields as untrusted input, use structured process APIs, apply least privilege, enforce admission policies, and monitor upgrade-resource activity and child-process behavior on edge nodes.

Find out what's already
exploitable in your codebase.