# CVE-2021-25748: Ingress-nginx `path` sanitization can be bypassed with newline character

- Severity: High 7.6 (CVSS:3.1, scored by kubernetes) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:L`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.69%, higher than 54% of CVEs (2026-12-01)
- Published: 2023-05-24T00:00:00.000Z
- Modified: 2026-08-07T08:12:12.689Z
- Also known as: GHSA-863x-868h-968x
- Weaknesses: CWE-20
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: kubernetes

## 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.

(As written by CVE List.)

## Affected

- Kubernetes Kubernetes ingress-nginx: from unspecified before 1.2.1
- k8s.io/ingress-nginx (Go): before 1.2.1
- kubernetes ingress-nginx: before 1.2.1

## Every score

- kubernetes: CVSS:3.1 7.6 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:L`
- GitHub: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N`
- NVD: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N`

## 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

- CVE List: [CVE-2021-25748](https://www.cve.org/CVERecord?id=CVE-2021-25748), CVE Terms of Use, modified 2025-01-16
- GitHub Advisory Database: [GHSA-863x-868h-968x](https://github.com/advisories/GHSA-863x-868h-968x), CC-BY-4.0, modified 2026-08-07
- NVD: [CVE-2021-25748](https://nvd.nist.gov/vuln/detail/CVE-2021-25748), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-25748 · Whole record: https://cve.day/CVE-2021-25748.json · Rebuilt by cve.day 2026-11-25T22:58:08.467Z
