Lesson 9 of 13 · 12m
The Admission Chain Is Checkpoint and Door
Mutating-then-validating ordering, failurePolicy fail-open, webhook attack surface, IngressNightmare, and when ValidatingAdmissionPolicy beats a webhook.
The pipeline has a policy checkpoint — and it's reachable
After authentication and authorization pass, every write request runs the admission chain: mutating admission plugins first (they may rewrite the object — DefaultStorageClass adds PVC storage classes, ServiceAccount injects the default SA, webhook endpoints get an AdmissionReview payload to modify), then schema validation, then validating admission plugins (pure yes/no), then persist to etcd. The built-ins you've met — PodSecurity, ResourceQuota, LimitRanger, NodeRestriction, AlwaysPullImages — all live here.
Dynamic admission uses MutatingWebhookConfiguration and ValidatingWebhookConfiguration. Each names webhook rules (which apiGroups/resources/operations trigger it) and clientConfig — an in-cluster Service or an external url, always HTTPS. The fields that decide whether it helps or hurts:
When a webhook fires, the API server POSTs an AdmissionReview object containing the candidate resource; the endpoint inspects it and returns allowed/denied or a mutated object. TLS to the configured endpoint is the only thing authenticating that exchange — which is why an exposed webhook port is an unauthenticated input surface into your admission pipeline.
failurePolicy:Failrejects the request when the webhook errors or times out.Ignoreadmits the request anyway. A security webhook onIgnoreis a security control that votes "yes" whenever it's down — fail-open by design. CVE-2023-2727 showed even a built-in plugin could be bypassed — the ImagePolicyWebhook check skipped entirely by launching the image as an ephemeral container (fixed in 1.27.3/1.26.6/1.25.11/1.24.15); a webhook on Ignore needs no CVE at all.timeoutSeconds: how long the API server waits before invokingfailurePolicy.namespaceSelector/objectSelector: scope what the webhook sees. A cluster-wide selector on a security webhook multiplies both its coverage and its outage radius.- Invocation order: webhooks run sorted by name, and mutating webhooks can be re-invoked after later mutations — a mutator that must see the final object needs a name sorting last, because any webhook after it can cause the earlier ones to run again.
matchPolicy:Equivalent(default) fires the webhook for equivalent versions/groups of a resource;Exactrestricts it to literally the listed versions. Leave it at the default unless you're deliberately narrowing.
When the webhook itself is the door
IngressNightmare, disclosed March 24, 2025 (CVE-2025-1974, CVSS 9.8), is the best argument that admission controllers are attack surface, not just controls. The ingress-nginx admission webhook accepted attacker-crafted AdmissionReview objects sent directly to its port, processed the object's nginx config snippets, and executed arbitrary code — unauthenticated, over the network, as a controller that reads every Secret in the cluster to validate TLS references. Wiz's disclosure estimated roughly 43% of cloud environments carried a vulnerable ingress-nginx and ~6,500 clusters exposed it publicly. No credentials needed, one request to a component most clusters run and nobody networks down.
The fix pattern it implies is broader than ingress-nginx: admission webhook pods should not be reachable from outside the cluster's control path. They're trusted with the raw object before validation — the least-scrutinized input in the pipeline.
The serverless alternative
ValidatingAdmissionPolicy (CEL expressions evaluated inside the API server, GA in 1.30) covers the declarative cases with no pod to crash, no endpoint to attack, and no failurePolicy to set wrong:
kind: ValidatingAdmissionPolicy
spec:
validations:
- expression: "object.spec.replicas <= 10"
message: "replicas over 10 not permitted"The expression evaluates inside the API server at the same pipeline stage a webhook would run. When a rule is expressible in CEL, prefer it; reserve webhooks (Kyverno, OPA/Gatekeeper) for policy that needs external data like image-signature lookups.
What to actually do
failurePolicy: Fail on anything whose absence should block deploys; explicit namespaceSelector scoping; webhook services reachable only inside the cluster; keep admission components patched first — IngressNightmare's victims were running a default addon. And audit which webhooks exist at all: kubectl get validatingwebhookconfigurations,mutatingwebhookconfigurations is a short list that should contain only things you put there.
Was this lesson helpful?
Keep reading
Related articles from the SudoSecurity blog.
A 257-Byte Password Is the Key: Inside the OpenSSH musl Bypass
CVE-2026-123158 lets an attacker log into a locked account on musl-based systems like Alpine by sending a password nobody set. The trigger is one number, 257, and the reason is a C library returning a single asterisk. I reproduced the exact boundary against musl 1.2.4 and read the fix.
Immich Had Fourteen Advisories and One Bug It Fixed Three Times
Immich's 2026 security record runs to fourteen advisories, and they cluster hard: the sharing features, the OAuth plumbing, and one login redirect parameter that took three separate fixes across eighty-three days. Plus the 3.0 migration traps still waiting for anyone who hasn't jumped yet.
Jellyfin's Threat Model Is Your Brother-in-Law
Four Jellyfin CVEs landed in 2026 and not one of them needs an admin account. One needs only the ability to name a file. Meanwhile Jellyfin 12 shipped in September, the version numbers stopped starting with 10, and every "am I patched" check you wrote is now wrong.
Node.js Fixed 16 Flaws in One Release. Most of Them Live in HTTP/2 and TLS.
The November 11 Node.js security releases fix 16 CVEs across the 26, 24 and 22 lines, seven of them rated high. Nearly all sit in HTTP/2 and TLS, where a remote client can crash a server, leak memory, or get past per-host client-certificate checks.