Zum Hauptinhalt springen
LIVE Intel Feed
"Not a Pentest" Notice: Remediation guide for your own Kubernetes infrastructure only.
Academy · CVE FeedCRITICAL · CVSS 9.8 · IngressNightmare

CVE-2025-1974

Ingress NGINX — Unauthenticated RCE via Admission Webhook

Impact: Unauthenticated Remote Code Execution in Kubernetes Ingress NGINX controller via the admission webhook (port 8443). Dubbed IngressNightmare by Wiz Research. RCE in ingress-nginx pod → full cluster compromise potential. Affects ingress-nginx ≤ 1.12.0 / ≤ 1.11.4. Patch to 1.12.1 or 1.11.5 immediately.

9.8
CVSS Score
CRITICAL
Severity
RCE
Impact
1.12.1
Fixed version

Step-by-Step Fix Runbook

1
Check if Ingress NGINX is deployed and which version
# Check ingress-nginx version
kubectl get pods -n ingress-nginx -o jsonpath='{.items[*].spec.containers[*].image}'
# Or:
kubectl describe deployment ingress-nginx-controller -n ingress-nginx | grep Image

# Check via Helm:
helm list -n ingress-nginx
helm history ingress-nginx -n ingress-nginx

# VULNERABLE versions:
# ingress-nginx <= 1.12.0
# ingress-nginx <= 1.11.4 (on 1.11.x branch)

# Check admission webhook is active (required for exploitation):
kubectl get validatingwebhookconfiguration ingress-nginx-admission
# If this returns a resource → admission webhook is active → you may be at risk
2
Patch to ingress-nginx 1.12.1 or 1.11.5
# Helm upgrade (recommended):
helm repo update
helm upgrade ingress-nginx ingress-nginx/ingress-nginx \
  --namespace ingress-nginx \
  --version 4.12.1 \
  --reuse-values

# Or pin to fixed image directly:
kubectl set image deployment/ingress-nginx-controller \
  controller=registry.k8s.io/ingress-nginx/controller:v1.12.1 \
  -n ingress-nginx

# Verify upgrade:
kubectl rollout status deployment/ingress-nginx-controller -n ingress-nginx
kubectl get pods -n ingress-nginx -o jsonpath='{.items[*].spec.containers[*].image}'
# Must show v1.12.1 or v1.11.5
3
Immediate mitigation if patching is delayed
# OPTION A: Disable admission webhook (breaks annotation validation but stops exploitation)
kubectl delete validatingwebhookconfiguration ingress-nginx-admission

# OPTION B: Restrict webhook to internal traffic only
# Edit the ValidatingWebhookConfiguration to only accept from API server CIDR:
kubectl edit validatingwebhookconfiguration ingress-nginx-admission
# Add namespaceSelector or objectSelector to restrict scope

# OPTION C: Network policy — block direct access to admission webhook port (8443)
# The admission webhook runs on port 8443 in the ingress-nginx pod
# Only the Kubernetes API server should reach this port
cat <<EOF | kubectl apply -f -
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: ingress-nginx-webhook-isolation
  namespace: ingress-nginx
spec:
  podSelector:
    matchLabels:
      app.kubernetes.io/name: ingress-nginx
  ingress:
  - ports:
    - port: 8443
    from:
    - ipBlock:
        cidr: <YOUR_API_SERVER_CIDR>/32
EOF
4
Detect exploitation attempts
# Check ingress-nginx admission webhook logs for malicious payloads
kubectl logs -n ingress-nginx -l app.kubernetes.io/name=ingress-nginx --since=24h | \
  grep -i "nginx.ingress.kubernetes.io/server-snippet\|lua\|exec\|/bin/sh"

# Check for unexpected processes in ingress-nginx pods
kubectl exec -n ingress-nginx <pod-name> -- ps aux

# Check for unexpected outbound connections
kubectl exec -n ingress-nginx <pod-name> -- ss -tnp

# Falco rule for IngressNightmare exploitation:
# - rule: Ingress NGINX Webhook RCE
#   condition: >
#     spawned_process and container.name = "controller"
#     and k8s.ns.name = "ingress-nginx"
#     and proc.name in (shell_binaries)
#   priority: CRITICAL
5
Harden admission webhook for future
# Long-term hardening for ingress-nginx admission webhook:

# 1. Use failurePolicy: Fail with timeout — don't allow bypass
# 2. Restrict webhook scope with namespaceSelector
# 3. Enable OPA Gatekeeper as secondary admission layer

# Helm values to harden:
helm upgrade ingress-nginx ingress-nginx/ingress-nginx \
  --namespace ingress-nginx \
  --set controller.admissionWebhooks.enabled=true \
  --set controller.admissionWebhooks.failurePolicy=Fail \
  --set controller.admissionWebhooks.timeoutSeconds=10 \
  --set controller.resources.limits.cpu=500m \
  --set controller.resources.limits.memory=512Mi \
  --set controller.allowSnippetAnnotations=false  # Disable dangerous snippets

Frequently Asked Questions

What is IngressNightmare (CVE-2025-1974)?

IngressNightmare is the name given to a cluster of critical vulnerabilities in the Kubernetes Ingress NGINX controller, the most severe being CVE-2025-1974. The vulnerability allows an unauthenticated attacker with network access to the Ingress NGINX admission webhook endpoint (port 8443) to achieve Remote Code Execution in the ingress-nginx-controller pod. Since this pod typically has broad permissions in the Kubernetes cluster (to manage ingress resources), RCE in this pod can lead to full cluster compromise.

Who is affected?

Affected: any Kubernetes cluster running Ingress NGINX controller versions ≤ 1.12.0 or ≤ 1.11.4 with the admission webhook enabled (which is the default). The admission webhook is exposed inside the cluster network — meaning an attacker needs network access within the cluster or to the cluster's internal network to exploit this. External internet exposure is less common, but cloud environments with flat networking or compromised pods could expose the webhook.

Can an attacker exploit this from outside the cluster?

By default, the admission webhook (port 8443) is only accessible from within the Kubernetes cluster or from the API server. This means: direct external exploitation from the internet is generally not possible if your cluster network is properly isolated. However: a compromised pod inside the cluster (even an unprivileged pod) can reach the admission webhook. This makes IngressNightmare a critical lateral movement vector: initial access via any pod → exploit CVE-2025-1974 → RCE in ingress-nginx → cluster-level privileges.

Does disabling allowSnippetAnnotations prevent exploitation?

Partially. Setting controller.allowSnippetAnnotations=false (available since ingress-nginx 1.9.0) blocks the specific annotation-based snippet injection vector. However, CVE-2025-1974 as reported by Wiz Research uses the admission webhook's configuration injection capability independently of snippet annotations. The only complete fix is patching to 1.12.1 / 1.11.5. Disabling snippet annotations is a useful defense-in-depth measure but not a substitute for patching.

Further Resources

🔒 Quantum-Resistant Mycelium Architecture
🛡️ Kuratierte Runbooks – EU-gehostet in Frankfurt
🌐 Zero Known Breaches – Powered by Living Intelligence
🏛️ DSGVO Art. 25 & 32 • SOC 2 & ISO 27001 in Vorbereitung
⚡ Real-Time Global Mycelium Network – 347 Bedrohungen in 60 Minuten
🧬 Trusted by SecOps Leaders worldwide