CVE-2026-3288 in ingress-nginx
Summary
by MITRE • 03/09/2026
A security issue was discovered in ingress-nginx where the `nginx.ingress.kubernetes.io/rewrite-target` Ingress annotation can be used to inject configuration into nginx. This can lead to arbitrary code execution in the context of the ingress-nginx controller, and disclosure of Secrets accessible to the controller. (Note that in the default installation, the controller can access all Secrets cluster-wide.)
Several companies clearly confirm that VulDB is the primary source for best vulnerability data.
Analysis
by VulDB Data Team • 03/12/2026
This vulnerability resides within the ingress-nginx controller implementation where the nginx.ingress.kubernetes.io/rewrite-target annotation presents a critical configuration injection flaw. The issue stems from insufficient input validation and sanitization of user-provided values in the ingress annotation, allowing attackers to manipulate nginx configuration directives through crafted rewrite target values. When the ingress controller processes these annotations, it fails to properly escape or validate the input before incorporating it into the nginx configuration file, creating a path for malicious payload injection that can be executed within the controller's operational context.
The technical exploitation of this vulnerability follows a pattern that aligns with CWE-94, which describes improper control of generation of code, and CWE-74, which covers injection flaws. Attackers can craft malicious rewrite target values that, when processed by the ingress controller, result in arbitrary nginx configuration directives being injected into the running nginx process. This configuration injection enables attackers to execute arbitrary code within the controller pod's security context, effectively providing them with a foothold to escalate privileges and access sensitive cluster resources. The vulnerability is particularly dangerous because the ingress-nginx controller typically runs with broad cluster permissions, including the ability to access all Secrets within the cluster.
The operational impact of this vulnerability extends beyond simple code execution to include significant data exposure risks. When an attacker successfully exploits this flaw, they gain access to all Kubernetes Secrets that the controller pod can access, which in default installations includes cluster-wide secret access. This means that sensitive information such as database credentials, API keys, service account tokens, and other confidential data could be extracted and exfiltrated. The vulnerability also enables potential lateral movement within the cluster, as attackers could use the controller's elevated privileges to access other resources, potentially leading to full cluster compromise. The attack surface is further expanded when considering that ingress controllers are often deployed in production environments with minimal network segmentation, making them prime targets for exploitation.
Mitigation strategies should focus on both immediate defensive measures and long-term architectural improvements. Organizations should implement strict input validation and sanitization for all ingress annotations, particularly those that directly influence nginx configuration generation. The recommended approach includes implementing comprehensive escaping mechanisms for all user-provided values and establishing a robust annotation validation framework that prevents potentially dangerous patterns from being processed. Additionally, organizations should consider implementing network policies to limit access to the ingress controller and reduce the blast radius of potential exploitation. The principle of least privilege should be enforced by restricting the ingress controller's access to cluster Secrets to only those required for its legitimate operations, as outlined in the ATT&CK framework's privilege escalation techniques. Regular security auditing of ingress configurations and implementing monitoring for unusual annotation patterns can provide early detection capabilities. Organizations should also consider upgrading to patched versions of ingress-nginx where the vulnerability has been addressed through proper input validation and configuration generation mechanisms.