CVE-2025-1098: CWE-20 Improper Input Validation in kubernetes ingress-nginx
A security issue was discovered in ingress-nginx https://github.com/kubernetes/ingress-nginx where the `mirror-target` and `mirror-host` Ingress annotations can be used to inject arbitrary 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.)
AI Analysis
Technical Summary
CVE-2025-1098 is a vulnerability identified in the Kubernetes ingress-nginx controller, specifically affecting versions up to 1.12.0. The issue stems from improper input validation (CWE-20) of the `mirror-target` and `mirror-host` annotations used in Ingress resources. These annotations are intended to configure request mirroring behavior in nginx, but due to insufficient sanitization, an attacker can inject arbitrary nginx configuration directives. This injection can escalate to arbitrary code execution within the ingress-nginx controller's runtime environment. Moreover, since the ingress-nginx controller typically runs with permissions that allow it to access all Kubernetes Secrets cluster-wide, an attacker exploiting this vulnerability can also exfiltrate sensitive information stored as Secrets. The vulnerability requires the attacker to have privileges to create or modify Ingress resources, which is often granted to cluster users or service accounts. The CVSS v3.1 score is 8.8 (high), reflecting network attack vector, low attack complexity, privileges required, no user interaction, and high impact on confidentiality, integrity, and availability. Although no public exploits are known at this time, the potential for full cluster compromise makes this a critical security concern for Kubernetes environments using ingress-nginx. No official patches are listed yet, so mitigation may involve restricting Ingress resource permissions and monitoring for suspicious annotation usage.
Potential Impact
The exploitation of CVE-2025-1098 can have severe consequences for organizations running Kubernetes clusters with ingress-nginx. An attacker able to inject arbitrary nginx configuration can execute code within the ingress controller, potentially gaining control over the cluster's ingress traffic and environment. The ability to disclose all Kubernetes Secrets accessible to the controller can lead to leakage of sensitive credentials, tokens, certificates, and other confidential data, facilitating further lateral movement and privilege escalation within the cluster. This can result in data breaches, service disruption, and compromise of critical infrastructure. Given the widespread use of Kubernetes and ingress-nginx in cloud-native deployments, the impact spans multiple industries including technology, finance, healthcare, and government. The vulnerability threatens confidentiality, integrity, and availability of cluster resources and applications, potentially undermining trust and causing significant operational and reputational damage.
Mitigation Recommendations
To mitigate CVE-2025-1098, organizations should take the following specific actions: 1) Immediately audit and restrict permissions to create or modify Ingress resources, limiting this capability to trusted users and service accounts only. 2) Implement strict admission controls and validation policies (e.g., using Kubernetes Admission Controllers or OPA Gatekeeper) to sanitize and restrict the values of `mirror-target` and `mirror-host` annotations, preventing injection of arbitrary configuration. 3) Monitor ingress-nginx controller logs and Kubernetes API server audit logs for unusual or unauthorized changes to Ingress annotations. 4) If possible, isolate the ingress-nginx controller with minimal privileges, reducing its access to Secrets and other sensitive resources by applying the principle of least privilege through Kubernetes RBAC. 5) Stay alert for official patches or updates from the Kubernetes ingress-nginx project and apply them promptly once available. 6) Consider deploying network segmentation and runtime security tools to detect anomalous behavior in ingress controllers. These measures go beyond generic advice by focusing on annotation validation, privilege restriction, and proactive monitoring tailored to this vulnerability's exploitation vector.
Affected Countries
United States, Germany, China, India, United Kingdom, Japan, Canada, Australia, France, Netherlands, South Korea, Brazil, Singapore
CVE-2025-1098: CWE-20 Improper Input Validation in kubernetes ingress-nginx
Description
A security issue was discovered in ingress-nginx https://github.com/kubernetes/ingress-nginx where the `mirror-target` and `mirror-host` Ingress annotations can be used to inject arbitrary 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.)
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2025-1098 is a vulnerability identified in the Kubernetes ingress-nginx controller, specifically affecting versions up to 1.12.0. The issue stems from improper input validation (CWE-20) of the `mirror-target` and `mirror-host` annotations used in Ingress resources. These annotations are intended to configure request mirroring behavior in nginx, but due to insufficient sanitization, an attacker can inject arbitrary nginx configuration directives. This injection can escalate to arbitrary code execution within the ingress-nginx controller's runtime environment. Moreover, since the ingress-nginx controller typically runs with permissions that allow it to access all Kubernetes Secrets cluster-wide, an attacker exploiting this vulnerability can also exfiltrate sensitive information stored as Secrets. The vulnerability requires the attacker to have privileges to create or modify Ingress resources, which is often granted to cluster users or service accounts. The CVSS v3.1 score is 8.8 (high), reflecting network attack vector, low attack complexity, privileges required, no user interaction, and high impact on confidentiality, integrity, and availability. Although no public exploits are known at this time, the potential for full cluster compromise makes this a critical security concern for Kubernetes environments using ingress-nginx. No official patches are listed yet, so mitigation may involve restricting Ingress resource permissions and monitoring for suspicious annotation usage.
Potential Impact
The exploitation of CVE-2025-1098 can have severe consequences for organizations running Kubernetes clusters with ingress-nginx. An attacker able to inject arbitrary nginx configuration can execute code within the ingress controller, potentially gaining control over the cluster's ingress traffic and environment. The ability to disclose all Kubernetes Secrets accessible to the controller can lead to leakage of sensitive credentials, tokens, certificates, and other confidential data, facilitating further lateral movement and privilege escalation within the cluster. This can result in data breaches, service disruption, and compromise of critical infrastructure. Given the widespread use of Kubernetes and ingress-nginx in cloud-native deployments, the impact spans multiple industries including technology, finance, healthcare, and government. The vulnerability threatens confidentiality, integrity, and availability of cluster resources and applications, potentially undermining trust and causing significant operational and reputational damage.
Mitigation Recommendations
To mitigate CVE-2025-1098, organizations should take the following specific actions: 1) Immediately audit and restrict permissions to create or modify Ingress resources, limiting this capability to trusted users and service accounts only. 2) Implement strict admission controls and validation policies (e.g., using Kubernetes Admission Controllers or OPA Gatekeeper) to sanitize and restrict the values of `mirror-target` and `mirror-host` annotations, preventing injection of arbitrary configuration. 3) Monitor ingress-nginx controller logs and Kubernetes API server audit logs for unusual or unauthorized changes to Ingress annotations. 4) If possible, isolate the ingress-nginx controller with minimal privileges, reducing its access to Secrets and other sensitive resources by applying the principle of least privilege through Kubernetes RBAC. 5) Stay alert for official patches or updates from the Kubernetes ingress-nginx project and apply them promptly once available. 6) Consider deploying network segmentation and runtime security tools to detect anomalous behavior in ingress controllers. These measures go beyond generic advice by focusing on annotation validation, privilege restriction, and proactive monitoring tailored to this vulnerability's exploitation vector.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- kubernetes
- Date Reserved
- 2025-02-07T00:11:53.927Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 69091a49c28fd46ded81d033
Added to database: 11/3/2025, 9:10:33 PM
Last enriched: 2/26/2026, 11:24:07 PM
Last updated: 3/25/2026, 2:48:40 AM
Views: 39
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.