Skip to content
Misconfiguration Write-up Intermediate

New Kubernetes Admission Controller Bypass via Mutating Webhook M

A crafted request can cause a mutating webhook to produce an invalid patch, which the validating webhook fails to process. If the validating webhook's failurePolicy is Ignore, the request may pass and allow privileged containers to be deployed.

Krishna Kumar Follow

Published on xalgord.medium.com

Kubernetes Security Alert: How a Sneaky Trick Bypasses Your Cluster’s Guards ☁️🛡️🔐💀 A deep-dive into the new admission controller bypass, explained in simple terms so you can understand the risk and protect your cloud clusters on AWS, Azure, and GCP.

Krishna Kumar, on xalgord.medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Impact

An attacker could deploy privileged containers or other forbidden resources, gaining a dangerous foothold in the cluster, but only if the validating webhook's failurePolicy is set to Ignore.

What the attacker needed

A validating webhook with failurePolicy Ignore; a mutating webhook that can be made to produce an invalid…; ability to send crafted requests to the Kubernetes API

The fix

Set failurePolicy to Fail on all validating and mutating webhooks so that errors block requests by default.

How it was found

  1. An attacker sends a request to create a Pod that violates a security policy, such as requesting privileged access.
  2. The request reaches a mutating webhook that is made to generate a broken or invalid patch.
  3. The malformed patch is passed to the validating webhook, which fails to process it.
  4. If the validating webhook's failurePolicy is Ignore, the request is allowed to pass.
  5. The Kubernetes API server processes the original malicious request and creates the privileged pod.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

Kubernetes uses admission controllers as security guards that check requests before allowing resources to be created. A mutating webhook can modify requests, and a validating webhook gives the final yes or no. This article describes a trick where a bad modification confuses the validating webhook, and if it is set to ignore errors, a dangerous request might get through.

What is Misconfiguration?

Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.

More by Krishna Kumar

View all

10 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Security misconfiguration

The lesson behind this report.

Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.