IngressNightmare: Unauth RCE in Ingress NGINX (CVE-2025-1974)
The Ingress-NGINX admission controller did not properly sanitise the auth-url annotation, allowing an attacker to inject arbitrary NGINX configuration. By uploading a shared library to the pod and using the ssl_engine directive, an unauthenticated attacker could execute code with the controller's privileges.
httpvoid.com
Published on httpvoid.com
Note - This is cross post from our work at Projectdiscovery Blog
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Impact
An unauthenticated attacker could execute code with the privileges of the Ingress-NGINX controller pod, potentially leading to complete cluster takeover and disclosure of all secrets across namespaces.
What the attacker needed
Network access to admission controller; vulnerable Ingress-NGINX version
The fix
The vulnerability was fixed in Ingress-NGINX Controller versions 1.12.1 and later, and 1.11.5 and later.
How it was found
- Identify clusters running vulnerable versions of Ingress-NGINX Controller.
- Craft an AdmissionReview request containing an ingress object with a malicious auth-url annotation.
- Upload a malicious shared library to the pod's filesystem via a large HTTP POST request to the NGINX instance.
- Send the crafted AdmissionReview request to the admission controller.
- The controller generates an NGINX configuration with the injected ssl_engine directive and validates it with nginx -t.
- During validation, the ssl_engine directive loads the uploaded shared library, executing the attacker's code.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
An admission controller is a Kubernetes component that checks incoming configuration objects before they are applied. Here, it built an NGINX configuration from user-supplied annotations without cleaning them, so an attacker could sneak in extra NGINX settings. Those settings could load a malicious library file and run code on the server.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.