Ingress-nginx vulnerabilities can lead to Kubernetes cluster takeover
Vulnerabilities mentionedAll →
| CVE | Vulnerability | CVSS | EPSS | Flags | Affected | Exposure | Published |
|---|---|---|---|---|---|---|---|
| CVE-2025-1097 | Config Injection RCE in Kubernetes ingress-nginx via auth-tls-match-cn annotation CVE-2025-1097 is a configuration injection flaw (CWE-20) in the Kubernetes ingress-nginx controller: values of the auth-tls-match-cn Ingress annotation are not properly sanitized, so an attacker who can create or modify Ingress resources can inject arbitrary nginx configuration directives. On configuration reload, the injected directives are interpreted by nginx, which can be escalated to arbitrary code execution in the context of the ingress-nginx controller. An attacker with code execution in the controller can also read Secrets accessible to it, and in a default installation the controller can access all Secrets cluster-wide, enabling broader cluster compromise. Any cluster running a vulnerable ingress-nginx controller is affected, with the greatest risk where untrusted or multi-tenant users hold rights to apply Ingress annotations or where controller pods are internet-exposed. Per the available data there is no confirmed in-the-wild exploitation or public PoC yet, but EPSS assigns a 35.5% probability of exploitation within 30 days (98th percentile), and the flaw is part of the "IngressNightmare" group of bugs reported to affect roughly 40% of cloud environments. Do: Upgrade ingress-nginx controllers to the latest release containing the IngressNightmare fixes and restart/verify the controller deployment. Until patched, restrict RBAC permissions for creating or modifying Ingress resources (especially the auth-tls-match-cn annotation) to trusted administrators, avoid exposing controller pods directly to the internet, and review which Secrets the controller service account can read. | 8.8 | 36% |
| large~hundreds of thousands of clusters (ingress-nginx reported in ~40% of cloud environments; ~6,800 controllers directly internet-exposed in public scans) | ||
| CVE-2025-1098 | Config Injection via Ingress Annotations Enables RCE in ingress-nginx CVE-2025-1098 is an input-validation flaw (CWE-20) in the Kubernetes ingress-nginx controller: the `mirror-target` and `mirror-host` Ingress annotations are not properly sanitized, allowing arbitrary NGINX configuration directives to be injected into the controller's generated configuration. An attacker who can create or modify Ingress resources in the cluster (low privileges, no user interaction required) crafts these annotation values, and the injected configuration is consumed by the controller's NGINX instance to execute arbitrary code in the context of the ingress-nginx controller. Successful exploitation also leads to disclosure of Secrets accessible to the controller; in a default installation the controller can read every Secret cluster-wide, enabling credential theft and potentially full cluster takeover. Any Kubernetes cluster running a vulnerable ingress-nginx controller is affected, and public research tied to the related 'IngressNightmare' disclosures found the component in roughly 40% of cloud environments. No public proof-of-concept or confirmed in-the-wild exploitation is known yet, but EPSS assigns this CVE an 83.5% probability of exploitation within 30 days (100th percentile), so rapid patching is warranted. Do: Upgrade all ingress-nginx controllers to the patched releases (v1.12.1 or v1.11.5 per the vendor advisory) and restart controller pods. As interim mitigations, restrict RBAC so only trusted principals can create or update Ingress objects or set the mirror-target/mirror-host annotations (e.g., via a ValidatingAdmissionPolicy), and limit the controller's Secret access below cluster-wide where possible. Also patch the related IngressNightmare CVEs disclosed alongside this one and review clusters for exposed admission webhooks. | 8.8 | 83% |
| mass≈100,000+ Kubernetes clusters plausibly affected (ingress-nginx is the most widely used ingress controller, present in ~40% of cloud environments per public… | ||
| CVE-2025-1974 | Unauthenticated RCE in Kubernetes ingress-nginx controller (IngressNightmare) CVE-2025-1974 is a critical (CVSS 9.8) unauthenticated remote code execution flaw in the Kubernetes ingress-nginx controller, identified as part of the IngressNightmare set of defects. An attacker who has any access to the pod network, with no credentials required, can trigger the flaw and execute arbitrary code in the context of the ingress-nginx controller process. From that position the attacker can disclose Secrets accessible to the controller, and in a default installation the controller can read all Secrets cluster-wide, which follow-on coverage notes can lead to Kubernetes cluster takeover. Any Kubernetes cluster running the ingress-nginx controller is affected; public research cited in the headlines estimates the component is present in roughly 40% of cloud environments. No public proof-of-concept or confirmed in-the-wild exploitation is known at this time, but EPSS assigns a 99.5% probability of exploitation within 30 days, making urgent patching prudent. Do: Upgrade the ingress-nginx controller to the patched release identified in the project's security advisory for CVE-2025-1974. Until patched, restrict pod-network access to the controller (including its admission webhook endpoint) so only the Kubernetes control plane can reach it, and consider narrowing the controller's RBAC so it cannot read all Secrets cluster-wide. Review audit logs for unexpected requests to the controller and inventory clusters for ingress-nginx deployments, especially internet-facing ones. | 9.8 | 100% |
| massvery large | ||
| CVE-2025-24513 | A security issue was discovered in ingress-nginx https://github.com/kubernetes/ingress-nginx where attacker-provided data are included in a filename by the ingr A security issue was discovered in ingress-nginx https://github.com/kubernetes/ingress-nginx where attacker-provided data are included in a filename by the ingress-nginx Admission Controller feature, resulting in directory traversal within the container. This could result in denial of service, or when combined with other vulnerabilities, limited disclosure of Secret objects from the cluster. NVD description · AI analysis pending | 4.8 | 4% | — | — | ||
| CVE-2025-24514 | Config Injection via auth-url Annotation Enables RCE in Kubernetes ingress-nginx CVE-2025-24514 is an input validation flaw (CWE-20) in the Kubernetes ingress-nginx controller in which the auth-url Ingress annotation is inserted into the nginx configuration without sufficient sanitization. An attacker who can create or modify Ingress resources (the low-privilege requirement in the CVSS vector) can supply a crafted auth-url value that injects arbitrary nginx configuration directives into the controller. Successful exploitation yields arbitrary code execution in the context of the ingress-nginx controller and disclosure of Secrets the controller can access — which, in a default installation, means all Secrets cluster-wide, potentially enabling broader cluster compromise. Any environment running affected versions of the ingress-nginx controller is exposed; related reporting on the 'IngressNightmare' bug set says the component runs in roughly 40% of cloud environments. No public proof-of-concept or confirmed in-the-wild exploitation is known for this flaw, but its EPSS of 32.6% (98th percentile) indicates a substantial probability of exploitation within 30 days. Do: Upgrade the ingress-nginx controller to the latest patched release published by the project and confirm running controller pods use the fixed image. Restrict RBAC permissions to create or modify Ingress resources to trusted principals and audit existing Ingress objects for auth-url annotations. Because a default installation lets the controller read all Secrets cluster-wide, consider narrowing its Secret access as defense-in-depth. | 8.8 | 33% |
| masslikely 100,000+ controller installations (component reported in ~40% of cloud environments) |
Full article584 words · extracted from helpnetsecurity.com · click to collapse
Wiz researchers have unearthed several critical vulnerabilities affecting Ingress NGINX Controller for Kubernetes (ingress-nginx) that may allow attackers to take over Kubernetes clusters.
“Based on our analysis, about 43% of cloud environments are vulnerable to these vulnerabilities, with our research uncovering over 6,500 clusters, including Fortune 500 companies, that publicly expose vulnerable Kubernetes ingress controllers’ admission controllers to the public internet—putting them at immediate critical risk,” the researchers noted.
The “IngressNightmare” vulnerabilities
Ingress NGINX Controller for Kubernetes – not to be confused with F5’s NGINX Ingress Controller – is a widely used open source controller for managing network traffic in Kubernetes clusters. It uses the NGINX web server as a reverse proxy and load balancer.
Ingress is a Kubernetes feature that is used for exposing workload pods (i.e., containers running on a cluster) externally. Ingress NGINX Controller for Kubernetes uses nginx configurations based on Ingress objects to route external traffic to applications running within Kubernetes clusters.
“Proper handling of these nginx configuration parameters is crucial, because ingress-nginx needs to allow users significant flexibility while preventing them from accidentally or intentionally tricking nginx into doing things it shouldn’t,” Kubernetes’ Tabitha Sable explained.
Unfortunately, the discovered vulnerabilities – which have collectively been dubbed “IngressNightmare” – may allow unauthenticated attackers to “cause nginx to misbehave” by serving a specially-crafted Ingress object.
The vulnerabilities are:
- CVE-2025-1097 – Allows for configuration injection via the “auth-tls-match-cn” Ingress annotation
- CVE-2025-1098 – Allows for configuration injection via the “mirror-target” and “mirror-host” Ingress annotations
- CVE-2025-24514 – Allows for configuration injection via the “auth-url” Ingress annotation
- CVE-2025-1974 – Allows for arbitrary code execution in the context of the ingress-nginx controller
- CVE-2025-24513 – Allows for directory traversal within the target container
“The most serious of [the] vulnerabilities, CVE-2025-1974, rated 9.8 CVSS, allows anything on the Pod network to exploit configuration injection vulnerabilities via the Validating Admission Controller feature of ingress-nginx. When combined with [the configuration injection] vulnerabilities, CVE-2025-1974 means that anything on the Pod network has a good chance of taking over your Kubernetes cluster, with no credentials or administrative access required,” Sable explained.
“In many common scenarios, the Pod network is accessible to all workloads in your cloud VPC, or even anyone connected to your corporate network!”
IngressNightmare vulnerabilities cab be exploited by external and internal attackers (Source: Wiz)
Upgrade the controller or deploy mitigations
Wiz researchers have released technical details about the vulnerabilities and a video demonstration of their RCE exploit.
Ingress-nginx maintainers have fixed the vulnerabilities in v1.12.1 and v1.11.5 of the controller, which should be implemented by cluster admins immediately.
“If you can’t upgrade right away, you can significantly reduce your risk by turning off the Validating Admission Controller feature of ingress-nginx,” Sable pointed out, and advised for this step to be only temporary.
“If you turn off the Validating Admission Controller feature as a mitigation for CVE-2025-1974, remember to turn it back on after you upgrade. This feature provides important quality of life improvements for your users, warning them about incorrect Ingress configurations before they can take effect.”
Wiz researchers have also noted that enforcing strict network policies so only the Kubernetes API Server can access the admission controller can serve as a mitigation.
AWS has stated that Amazon Elastic Kubernetes Service does not provide or install the ingress-nginx controller and is not affected by these issues, but that customers who have installed this controller on their clusters should update to the latest version. Google Cloud has issued similar advice for Google Kubernetes Engine users.
Text extracted automatically; images, tables and formatting may be missing. Original: https://www.helpnetsecurity.com/2025/03/25/ingressnightmare-ingress-nginx-vulnerabilities-kubernetes-cluster-takeover/