# CVE-2021-25746: Ingress-nginx directive injection via annotations

- 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): 1.44%, higher than 73% of CVEs (2026-12-01)
- Published: 2022-05-06T00:50:15.541Z
- Modified: 2026-06-17T03:42:23.623Z
- Weaknesses: CWE-20
- Assigned by: kubernetes

## Description

A security issue was discovered in ingress-nginx where a user that can create or update ingress objects can use .metadata.annotations in 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.0
- kubernetes ingress-nginx: before 1.2.0

## 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`
- NVD: CVSS:3.1 7.1 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N`
- NVD: CVSS:2.0 5.5 Medium `AV:N/AC:L/Au:S/C:P/I:P/A:N`

## References

- <https://groups.google.com/g/kubernetes-security-announce/c/hv2-SfdqcfQ> (issue-tracking, mitigation, third-party-advisory)
- <https://github.com/kubernetes/ingress-nginx/issues/8503> (issue-tracking, mitigation, third-party-advisory)
- <https://security.netapp.com/advisory/ntap-20220609-0006/> (third-party-advisory)

## Sources

- CVE List: [CVE-2021-25746](https://www.cve.org/CVERecord?id=CVE-2021-25746), CVE Terms of Use, modified 2024-09-17
- NVD: [CVE-2021-25746](https://nvd.nist.gov/vuln/detail/CVE-2021-25746), Public domain, modified 2026-06-17

---

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