CVE-2025-15566 Overview
A security issue was discovered in ingress-nginx where the nginx.ingress.kubernetes.io/auth-proxy-set-headers 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. In the default installation, the controller can access all Secrets cluster-wide, significantly amplifying the potential impact of this vulnerability.
Critical Impact
Attackers with low privileges can inject malicious nginx configuration to achieve arbitrary code execution and access cluster-wide Secrets in Kubernetes environments running vulnerable ingress-nginx controllers.
Affected Products
- ingress-nginx controller (vulnerable versions)
- Kubernetes clusters using ingress-nginx with default configurations
- Environments where ingress-nginx controller has cluster-wide Secret access
Discovery Timeline
- 2026-02-06 - CVE CVE-2025-15566 published to NVD
- 2026-02-06 - Last updated in NVD database
Technical Details for CVE-2025-15566
Vulnerability Analysis
This vulnerability is classified as CWE-20 (Improper Input Validation) and allows for configuration injection attacks against the ingress-nginx controller. The flaw exists in how the ingress-nginx controller processes the nginx.ingress.kubernetes.io/auth-proxy-set-headers annotation. When this annotation is parsed, insufficient validation allows an attacker to inject arbitrary nginx configuration directives.
The attack can be executed over the network by an authenticated user with limited privileges—specifically, any user who can create or modify Ingress resources. The vulnerability requires no user interaction and can result in complete compromise of confidentiality, integrity, and availability of the affected system.
Root Cause
The root cause of this vulnerability is improper input validation in the ingress-nginx controller when processing the auth-proxy-set-headers annotation. The controller fails to properly sanitize or validate the annotation value before incorporating it into the generated nginx configuration. This allows specially crafted annotation values to break out of the intended context and inject arbitrary configuration directives.
Attack Vector
The attack vector is network-based and requires the attacker to have low-level privileges—specifically the ability to create or modify Ingress resources in a Kubernetes cluster. An attacker can craft a malicious Ingress manifest containing a poisoned nginx.ingress.kubernetes.io/auth-proxy-set-headers annotation. When the ingress-nginx controller processes this annotation, the injected configuration is incorporated into the nginx configuration, potentially allowing:
- Execution of arbitrary code within the context of the ingress-nginx controller pod
- Access to Kubernetes Secrets that the controller has permission to read (cluster-wide by default)
- Lateral movement within the Kubernetes cluster
- Data exfiltration through the compromised controller
For technical details on the vulnerability mechanism, refer to the GitHub Kubernetes Issue.
Detection Methods for CVE-2025-15566
Indicators of Compromise
- Unexpected or malformed nginx.ingress.kubernetes.io/auth-proxy-set-headers annotations in Ingress resources
- Unusual nginx configuration changes or syntax in the ingress-nginx controller
- Unauthorized Secret access patterns from the ingress-nginx controller pod
- Anomalous outbound network connections from ingress-nginx controller pods
Detection Strategies
- Implement admission controllers to validate and sanitize Ingress annotations before they are applied
- Monitor Kubernetes audit logs for Ingress resource creation or modification with suspicious annotation values
- Deploy runtime security solutions like SentinelOne Singularity to detect configuration injection attempts and anomalous process execution
- Use OPA/Gatekeeper policies to restrict which annotations can be used on Ingress resources
Monitoring Recommendations
- Enable and monitor Kubernetes audit logging with focus on Ingress resource events
- Configure alerts for Secret access patterns from ingress-nginx controller pods
- Implement network monitoring to detect unusual egress traffic from ingress controller namespaces
- Review ingress-nginx controller logs for configuration parsing errors or unexpected directives
How to Mitigate CVE-2025-15566
Immediate Actions Required
- Review all existing Ingress resources for suspicious auth-proxy-set-headers annotations
- Implement RBAC restrictions to limit which users can create or modify Ingress resources
- Apply the principle of least privilege to the ingress-nginx controller's Secret access permissions
- Consider deploying admission webhooks to validate Ingress annotations
Patch Information
Organizations should monitor the GitHub Kubernetes Issue for official patch releases and update their ingress-nginx controllers to the latest patched version as soon as it becomes available. Until a patch is applied, implement the workarounds and detection strategies outlined above.
Workarounds
- Restrict the ability to create or modify Ingress resources using Kubernetes RBAC
- Deploy Open Policy Agent (OPA) Gatekeeper policies to block or sanitize the auth-proxy-set-headers annotation
- Limit the ingress-nginx controller's access to Secrets by configuring namespace-specific RBAC instead of cluster-wide access
- Consider using network policies to restrict egress from the ingress-nginx controller namespace
# Example: OPA Gatekeeper constraint to restrict auth-proxy-set-headers annotation
# Deploy this ConstraintTemplate and Constraint to block potentially malicious annotations
kubectl apply -f - <<EOF
apiVersion: constraints.gatekeeper.sh/v1beta1
kind: K8sBlockIngressAnnotation
metadata:
name: block-auth-proxy-set-headers
spec:
match:
kinds:
- apiGroups: ["networking.k8s.io"]
kinds: ["Ingress"]
parameters:
blockedAnnotations:
- "nginx.ingress.kubernetes.io/auth-proxy-set-headers"
EOF
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.


