CVE-2021-25748
7.6high
Ingress-nginx `path` sanitization can be bypassed with newline character
- Severity
- 7.6high CVSS:3.1 by kubernetes
- Exploit likelihood
- 0.69% (higher than 54% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- kubernetes
- Also known as
- GHSA-863x-868h-968x
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
| Product or package | Versions | Reported by |
|---|---|---|
| Kubernetes Kubernetes ingress-nginx | from unspecified before 1.2.1 | CVE List |
| k8s.io/ingress-nginx (Go) | before 1.2.1 | GitHub Advisory Database |
| kubernetes ingress-nginx | before 1.2.1 | NVD |
All scores
| kubernetes | 7.6high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:L |
| GitHub | 6.5medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N |
| NVD | 6.5medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
References
| https://groups.google.com/g/kubernetes-security-announce/c/avaRYa9c7I8 | mailing-list, mitigation, vendor-advisory, web | |
| https://github.com/kubernetes/ingress-nginx/issues/8686 | issue-tracking, mitigation, vendor-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2021-25748 | advisory | |
| https://github.com/kubernetes/ingress-nginx/pull/8623 | web | |
| https://github.com/kubernetes/ingress-nginx | package | |
| https://github.com/kubernetes/ingress-nginx/releases/tag/controller-v1.2.1 | web | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2021-25748 changed 2025-01-16 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-863x-868h-968x changed 2026-08-07 | CC-BY-4.0 |
| NVD | CVE-2021-25748 changed 2026-06-17 | Public domain |