Command Injection in Kubernetes NodeLogQuery on Windows
CVE-2024-9042 is a command-injection vulnerability in the Kubernetes NodeLogQuery feature affecting Windows worker nodes. Insufficient validation of the pattern parameter allows attacker-controlled input to be interpreted as PowerShell commands when processing log queries. A remote user authorized to query node logs can submit a crafted GET request and execute arbitrary commands with SYSTEM privileges. Exploitation requires NodeLogQuery to be enabled; Linux nodes are not affected.
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
What an attacker gets, and what they’ve been doing with it.
Successful exploitation compromises an affected Windows worker node with SYSTEM privileges, allowing access to sensitive host data and modification of host resources. Multiple vulnerable Windows nodes may be compromised if the attacker can query their logs. Broader cluster compromise is possible depending on credentials and resources accessible from the compromised nodes, but is not an automatic consequence.
If you can’t patch tonight, do this now.
Until patched, disable NodeLogQuery on Windows worker nodes where operationally feasible. Restrict log-query permissions using least-privilege RBAC and limit network access to node management interfaces. Review Kubernetes audit logs for suspicious log-query parameters and monitor Windows nodes for unexpected PowerShell execution associated with log queries.
Patch, then assume compromise.
Upgrade Kubernetes to the fixed release for the deployed branch: 1.29.13, 1.30.9, 1.31.5, or 1.32.1, or a later supported release containing the fix. Ensure affected Windows worker nodes receive the updated components. The fix passes user input to PowerShell through an environment variable rather than interpolating it into executable commands. For applicable VMware Tanzu Kubernetes Grid Integrated Edition deployments, release 1.23.4 is explicitly identified as resolving this vulnerability.
No public exploits tracked yet. Mallory keeps watching.
19 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.