All vulnerabilities
CRITICALInfra

K8S-INGRESSNIGHTMARE-2025

Kubernetes · ingress-nginx (Ingress-NGINX Controller for Kubernetes)

Summary

IngressNightmare was a chain of five vulnerabilities in the Ingress-NGINX Controller for Kubernetes disclosed on 24 March 2025 by the Wiz Research team, the most severe being CVE-2025-1974 (CVSS 9.8), which enabled unauthenticated remote code execution from the pod network. Wiz estimated about 43% of cloud environments were vulnerable and identified over 6,500 publicly exposed clusters, including Fortune 500 organizations. The controller's validating admission webhook ran as an unauthenticated HTTP endpoint reachable by any workload on the pod network, accepting attacker-supplied AdmissionReview requests containing crafted Ingress objects. The supporting CVEs (CVE-2025-24514 auth-url, CVE-2025-1097 auth-tls-match-cn, CVE-2025-1098 mirror UID, CVE-2025-24513 path bypass) injected unsanitized NGINX configuration directives via annotations into a temporary config the controller validated with nginx -t. The attacker uploaded a shared-library payload by abusing NGINX client-body buffering (an oversized Content-Length keeps the request file descriptor open in ProcFS) and then used the injected ssl_engine directive to load that library during validation, achieving code execution in the controller pod whose service account could read all cluster secrets across namespaces, enabling full cluster takeover.

How to avoid it in your code

  • Patch to ingress-nginx 1.12.1 or 1.11.5 (Helm chart 4.12.1+ / 4.11.5+) or later immediately.
  • Never expose the admission controller webhook to untrusted networks; restrict it to the Kubernetes API server only.
  • Enforce NetworkPolicies so only the API server can reach the admission webhook on the pod network.
  • Temporarily disable the admission controller if patching is delayed and it is not required.
  • Restrict who can create or modify Ingress objects via RBAC and admission policy.

References

Related vulnerabilities

All Infra →