What’s Vulnerable › Vulnerabilities
CVE-2021-25748: Ingress-nginx `path` sanitization can be bypassed with newline character
- Severity: medium (CVSS 6.5 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.7% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2023-05-24 · updated 2026-06-17
- Weakness: CWE-20
Description
A security issue was discovered in ingress-nginx where a user that can create or update ingress objects can use a newline character to bypass the sanitization of the `spec.rules[].http.paths[].path` field of an Ingress object (in the `networking.k8s.io` or `extensions` API group) to obtain the credentials of the ingress-nginx controller. In the default configuration, that credential has access to all secrets in the cluster.
Affected products
- Kubernetes ingress-nginx: before 1.2.1 — fixed in 1.2.1
How to fix
Upgrade to a fixed version: Kubernetes ingress-nginx 1.2.1. Check the vendor advisory for mitigations.
References
- https://github.com/kubernetes/ingress-nginx/issues/8686
- https://groups.google.com/g/kubernetes-security-announce/c/avaRYa9c7I8
- https://github.com/kubernetes/ingress-nginx/issues/8686
- https://groups.google.com/g/kubernetes-security-announce/c/avaRYa9c7I8
Get alerted when CVE-2021-25748 or the next vulnerability affects your stack