A series of remote code execution (RCE) vulnerabilities known as “IngressNightmare” have been discovered in the Ingress NGINX Controller for Kubernetes.
These vulnerabilities, identified as CVE-2025-1097, CVE-2025-1098, CVE-2025-24514, and CVE-2025-1974, pose a critical threat to Kubernetes clusters, allowing attackers to gain unauthorized access to all cluster secrets and potentially take control of the entire cluster.
The CVE-2025-24514 vulnerability arises from the handling of authentication-related annotations, specifically the nginx.ingress.kubernetes.io/auth-url annotation.
In the authReq parser, the auth-url field is not properly sanitized when it is incorporated into the NGINX configuration.
This oversight allows attackers to inject arbitrary NGINX directives by crafting malicious annotations.
For instance, if an attacker uses the following annotation:
nginx.ingress.kubernetes.io/auth-url: "http://example.com/#;\ninjection_point"
The resulting NGINX configuration could appear as:
proxy_http_version 1.1;
set $target http://example.com/#;
injection_point
proxy_pass $target;
This vulnerability is particularly dangerous because it allows attackers to inject commands into the NGINX configuration, potentially leading to remote code execution.
According to the Wiz reports,CVE-2025-1097 involves the nginx.ingress.kubernetes.io/auth-tls-match-cn annotation, which requires a value starting with “CN=” and followed by a valid regular expression.
However, attackers can bypass these checks to inject arbitrary configurations. For example, using the annotation:
nginx.ingress.kubernetes.io/auth-tls-match-cn: "CN=abc #(\n){}\n }}\nglobal_injection;\n#"
can lead to injection of arbitrary NGINX directives into the configuration file.
To exploit this, attackers need access to a TLS certificate or keypair secret in the cluster, which is often readily available in managed environments. Commonly exploited secrets include:
kube-system/konnectivity-certs
kube-system/azure-wi-webhook-server-cert
kube-system/aws-load-balancer-webhook-tls
kube-system/hubble-server-certs
kube-system/cilium-ca
calico-system/node-certs
cert-manager/cert-manager-webhook-ca
linkerd/linkerd-policy-validator-k8s-tls
linkerd/linkerd-proxy-injector-k8s-tls
linkerd/linkerd-sp-validator-k8s-tls
In this vulnerability, the mirror annotation parser allows attackers to inject arbitrary directives by manipulating the UID field of the ingress object.
Since this input is not sanitized by regex rules applied to annotations, attackers can easily escape the intended context and inject arbitrary NGINX configurations.
While the previous vulnerabilities allow for configuration injection, CVE-2025-1974 demonstrates how these injections can be leveraged for remote code execution.
By exploiting the ssl_engine directive within the injected configurations, attackers can load arbitrary shared libraries from the filesystem.
This is achieved by using NGINX’s client body buffering feature to temporarily save a shared library onto the pod’s filesystem and then specifying its ProcFS path to load it as a library.
Exploitation Steps
The exploitation involves the following key steps:
To mitigate these vulnerabilities, users should:
As these vulnerabilities expose clusters to significant risk, immediate action is advised to secure Ingress NGINX Controllers and prevent potential takeovers.
The security community encourages ongoing vigilance regarding admission controllers, often overlooked but critical components in Kubernetes environments.
Investigate Real-World Malicious Links & Phishing Attacks With Threat Intelligence Lookup - Try for Free
A new project has exposed a critical attack vector that exploits protocol vulnerabilities to disrupt…
A threat actor known as #LongNight has reportedly put up for sale remote code execution…
Ivanti disclosed two critical vulnerabilities, identified as CVE-2025-4427 and CVE-2025-4428, affecting Ivanti Endpoint Manager Mobile…
Hackers are increasingly targeting macOS users with malicious clones of Ledger Live, the popular application…
The European Union has escalated its response to Russia’s ongoing campaign of hybrid threats, announcing…
Venice.ai has rapidly emerged as a disruptive force in the AI landscape, positioning itself as…