Unauthenticated Remote Code Execution in Ingress NGINX (CVE-2025-1974)
A critical vulnerability, CVE-2025-1974, in the Kubernetes Ingress-NGINX Controller makes unauthenticated remote code execution possible, allowing attackers to execute arbitrary code without authentication. Along with related flaws, it has been dubbed "Ingress Nightmare" by cloud security company Wiz.
Overview
CVE-2025-1974 carries a CVSS score of 9.8 (Critical). It allows attackers to execute arbitrary code without authentication by targeting the admission controller.
Ingress Nightmare: The Vulnerability Cluster
The following CVEs are part of the Ingress Nightmare suite:
- CVE-2025-24513 - Improper input validation may cause directory traversal or denial of service (CVSS 4.8).
- CVE-2025-24514 - Exploiting the
auth-urlannotation allows arbitrary code execution (CVSS 8.8). - CVE-2025-1097 - Exploits via
match-cnforauth-tlsenable unauthorized code execution (CVSS 8.8). - CVE-2025-1098 - Injecting configuration through
mirror-hostandmirror-targetannotations can lead to RCE (CVSS 8.8). - CVE-2025-1974 - Allows unauthenticated RCE through the admission controller (CVSS 9.8).
The NGINX Ingress Controller, which is distinct from the Kubernetes Ingress-NGINX Controller, is unaffected.
What Is Kubernetes Ingress?
Ingress is a Kubernetes API object that manages external access to services, typically HTTP and HTTPS, using hostnames, paths, SSL/TLS termination, and load balancing. An Ingress Controller like Ingress-NGINX completes this function by converting Ingress objects into real routing configurations.
How CVE-2025-1974 Enables Remote Code Execution
The vulnerability lies in the Ingress-NGINX admission controller, which validates incoming ingress objects. Attackers can:
- Craft malicious ingress objects with a specially formed
auth-urlannotation. - Send these directly to the admission controller over the network, without authentication.
- Inject arbitrary NGINX directives using annotations.
- Upload a malicious shared object (.so) via an HTTP POST to the pod.
- Trigger
nginx -tto validate the injected config, loading the attacker's shared library.
The ssl_engine directive in OpenSSL was key to enabling arbitrary library loading during config validation.
Affected Versions
- Affected: Ingress-NGINX Controller earlier than v1.11.5, and all v1.11.x versions before v1.11.5.
- Fixed in: v1.11.5 and v1.12.1 and later.
Remediation and Best Practices
Secure your Kubernetes clusters immediately:
- Upgrade to a fixed version (v1.12.1 or later).
- Disable validating admission webhooks temporarily (via Helm
controller.admissionWebhooks.enabled=false, or manually by deletingingress-nginx-admissionand updating deployment args). - Audit ingress rules with
kubectl get ingress --all-namespaces. - Isolate namespaces to avoid lateral movement.
- Restrict ingress changes to authorized users only.
- Apply network policies to restrict pod access.
- Enforce HTTPS and use strong TLS ciphers.
- Monitor Kubernetes audit logs with ELK, Prometheus, Grafana, or Falco.
- Use a WAF such as ModSecurity or AWS WAF.
- Scan YAML and Helm charts for misconfigurations using OPA or Kyverno.
- Run Kubernetes security scanners such as kube-bench and kube-hunter.
Disable the admission controller only temporarily. Reactivate it after upgrading to restore security validations.
Conclusion
Ingress Nightmare is a reminder that infrastructure components need the same security scrutiny as applications. Comprehensive Kubernetes security assessments should include infrastructure and configuration reviews, ingress and admission controller hardening, vulnerability and misconfiguration scanning, CI/CD integration for DevSecOps, and container security testing. Stay ahead of zero-days.