
This document presents a study of the vulnerability CVE-2025-1974 affecting the ingress-nginx component (validating admission controller) for Kubernetes.
CVE-2025-1974 is a critical vulnerability (CVSS 3.1 9.8), an unauthenticated Remote Code Execution (RCE) in the context of the ingress-nginx process. When executing an attack, an attacker with access to the pod network (or a way to deliver an AdmissionReview to the validating webhook) can achieve arbitrary code execution in the controller pod, potentially leading to disclosure of Secrets and cluster takeover.
Ingress-nginx is one of the most common Ingress controllers in Kubernetes (estimates indicate usage in tens of percent of clusters), so the practical impact of the vulnerability is very high. Descriptions, technical analysis, and official fix recommendations were published by Kubernetes, Wiz researchers, and several vendor blogs.
Step-by-step analysis of CVE-2025-1974 and preparation of materials necessary for a write-up:
This research is conducted exclusively for educational and ethical purposes and is intended for test/controlled environments.
Under no circumstances should exploits/PoCs be run against other people's clusters or publicly available instances without the owner's written permission. Publishing fully functional "weaponized" PoC openly greatly increases the risk of abuse—it is better to provide safe PoC and methodology in the public part. (Official advisories and vendors also emphasize caution when distributing exploits.)
cpe:2.3:a:kubernetes:ingress-nginx_controller:<version> — vulnerable ingress-nginx versions (specific versions are indicated in advisories; update values upon final publication).Configuration conditions under which the vulnerability is relevant:
Brief summary.
The vulnerability was discovered in the Validating Admission Controller component of the Ingress-NGINX controller and is related to how this component generates and checks a temporary NGINX configuration based on incoming Ingress / AdmissionReview objects. During processing, the controller generates nginx.conf and runs a configuration check (nginx -t). Due to insufficient sanitization of Ingress/AdmissionReview fields, an attacker can inject specially crafted fragments that end up in the generated config, ultimately leading to command execution within the controller process — i.e., remote code execution (RCE) in the ingress-nginx pod.
AdmissionReview/Ingress objects accepted by the controller's validating webhook become input data for generating the NGINX configuration (including annotation fields, backend settings, etc.).Ingress or direct AdmissionReview can inject controlled strings into configuration templates/fragments. When such an nginx.conf is checked/loaded, the validation process (nginx -t) and subsequent operations with the configuration file can lead to arbitrary code execution, file write/execution, or command execution in the controller context.AdmissionReview to the validating webhook (access from the pod network or direct network access); absence of compensating measures — NetworkPolicy, RBAC restrictions, or additional webhook authentication. In some scenarios, Create/Update privileges can be bypassed by sending a crafted AdmissionReview directly to the webhook.
Successful exploitation gives code execution in the ingress-nginx container, which typically allows:
ingress-nginx-controller-admission and the ingress-nginx-controller service from non-standard sources (in reports, from containers like alpine), which should not happen under normal conditions.nginx -t and sudden controller restarts, as well as unexpected file write operations from the ingress-nginx process.Ingress-NGINX is one of the most widely used Ingress controllers in Kubernetes (commonly used to organize external access to services). The controller acts as a reverse proxy: it accepts external traffic and proxies it to the appropriate Service/Pod based on a set of Ingress rules. The Ingress-NGINX project is very popular and has a significant installation share in internet-accessible clusters.
Ingress-NGINX is mentioned in Kubernetes documentation as a reference example of an Ingress controller. Estimates indicate that a significant portion of exposed clusters use it; some studies suggest that around 41% of publicly accessible clusters use Ingress-NGINX. It is precisely because of its widespread use and central role in traffic routing that vulnerabilities in this component have high practical impact.
validate.nginx.ingress.kubernetes.io). This makes it easy to reach from inside the cluster.Ingress / AdmissionReview is created, where certain fields contain malicious strings that have not undergone proper filtering.nginx.conf based on this input and executes nginx -t / other validation operations.Such vulnerabilities are especially dangerous when combined with other defects: a compromised pod (or SSRF in a public application) + an exposed validating webhook gives a high chance of full compromise. Therefore, incident analysis should consider the chain of dependencies and potential vectors, not just the ingress-nginx version.