# CVE-2021-25742: Ingress-nginx custom snippets allows retrieval of ingress-nginx serviceaccount token and secrets across all namespaces

- 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): 2.11%, higher than 82% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2021-10-29T04:05:10.713Z
- Modified: 2026-06-17T03:42:23.243Z
- 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 the custom snippets feature to obtain all secrets in the cluster.

(As written by CVE List.)

## Affected

- Kubernetes Kubernetes ingress-nginx: from unspecified up to 0.49.0; from next of 0.49.0 before unspecified; from unspecified up to 1.0.0; from next of 1.0.0 before unspecified
- kubernetes ingress-nginx: before 0.49.1; 1.0.0
- netapp trident: no versions given

## 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://github.com/kubernetes/ingress-nginx/issues/7837> (exploit, issue-tracking, mitigation, third-party-advisory)
- <https://groups.google.com/g/kubernetes-security-announce/c/mT4JJxi9tQY> (mailing-list, mitigation, third-party-advisory)
- <https://security.netapp.com/advisory/ntap-20211203-0001/> (third-party-advisory)

## Sources

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

---

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