Security

Patches

Don't want your Kubernetes Windows nodes hijacked? Patch this hole now

SYSTEM-level command injection via API parameter *chef's kiss*


A now-fixed command-injection bug in Kubernetes can be exploited by a remote attacker to gain code execution with SYSTEM privileges on all Windows endpoints in a cluster, and thus fully take over those systems, according to Akamai researcher Tomer Peled.

Peled found the vulnerability, tracked as CVE-2024-9042, while conducting research for a presentation at last year's DEF CON infosec event about another Kubernetes-related flaw involving command injection in the open source container platform's sidecar project git-sync.

The latest vulnerability received a medium-severity score of 5.9 out of 10, and it affects Kubernetes versions earlier than 1.32.1 with beta features enabled.

Additionally, to exploit CVE-2024-9042, the Kubernetes cluster must not only be running Windows endpoints – the flaw doesn't affect any other OSes – it must be configured to run Log Query. This is a new, beta-level mechanism for pulling up the system status of remote machines using a command-line interface or a web API via a tool like Curl.

As Peled explained:

For example, a user can type the following command to query the status of the kubelet service on a remote node:

kubectl get --raw "/api/v1/nodes/node-1.example/proxy/logs/?query=kubelet"

The vulnerability allows an attacker who has the ability to send such a query to a node to inject commands into that system with high privileges via a pattern parameter in the request. Log Query does not sufficiently validate and sanitize that parameter, which if carefully formatted will be executed on that Windows node.

Peled, who has shared a proof-of-concept exploit in the form of a Curl invocation and provided advice and further details here, suggests prioritizing patching this bug.

According to the Kubernetes project's security advisory, which lists off the versions you need to update to, users can detect whether this vulnerability has been exploited by examining their cluster's audit logs and searching for logs queries with suspicious inputs.

Who exactly is really at risk of attack, however, is called into question by Peled's analysis. There's unlikely to be many deployments running Windows Kubernetes nodes with beta logging features turned on, so this bug is more interesting as a lesson in secure coding than terrifying.

He does stress that the flaw only affects Kubernetes Windows nodes running beta management software. But then adds: "Since the issue lies within the source code, this threat will remain active and exploitation of it will likely increase — this is why we strongly advise patching your cluster even if it doesn't have any Windows nodes."

Peled told The Register Akamai had not seen any indication of active exploitation. He also explained his statement about expecting exploitation to increase thus:

"Even though there were several steps to make the exploit work, the payload does not require a lot of technical knowledge to create," he said. "We expect exploitation to increase because of the ease of creating the payload, it being common knowledge with the disclosure, and the severity of the impact to companies who use this feature."

Kubernetes, for its part, has marked the flaw as fixed, and a project maintainer stressed to The Register it's really limited to Windows nodes and no longer an active threat.

"CVE-2024-9042 only affects builds of Kubernetes for Windows OS," the K8s bod said. "The vulnerable logic was not compiled into builds of Kubernetes used in Linux for affected versions, and Linux hosts running Kubernetes are unaffected." ®

Send us news
4 Comments

Windows 7 lives! How to keep your favorite fossil running

You probably shouldn't, but if you must, you can

Ivanti endpoint manager can become endpoint ravager, thanks to quartet of critical flaws

PoC exploit code shows why this is a patch priority

Why did the Windows 95 setup use Windows 3.1?

If MS-DOS could play Doom, surely a battleship gray button was a possibility?

Microsoft trims more CPUs from Windows 11 compatibility list

OEMs blowing dust from the processor stock cupboard, beware

US Cyber Command reportedly pauses cyberattacks on Russia

PLUS: Phishing suspects used fishing gear as alibi; Apple's 'Find My' can track PCs and Androids; and more

How nice that state-of-the-art LLMs reveal their reasoning ... for miscreants to exploit

Blueprints shared for jail-breaking models that expose their chain-of-thought process

Qualcomm pledges 8 years of security updates for Android kit using its chips (YMMV)

Starting with Snapdragon 8 Elite and 'droid 15

Drug-screening biz DISA took a year to disclose security breach affecting millions

If there's something nasty on your employment record, extortion scum could come calling

Malware variants that target operational tech systems are very rare – but 2 were found last year

Fuxnet and FrostyGoop were both used in the Russia-Ukraine war

Microsoft expands Copilot bug bounty targets, adds payouts for even moderate messes

Said bugs 'can have significant implications' – glad to hear that from Redmond

C++ creator calls for help to defend programming language from 'serious attacks'

Bjarne Stroustrup wants standards body to respond to memory-safety push as Rust monsters lurk at the door

China's Silver Fox spoofs medical imaging apps to hijack patients' computers

Sly like a PRC cyberattack