CVE-2021-25742Ingress-nginx custom snippets allows retrieval of ingress-nginx serviceaccount token and secrets across all namespaces
- 7.6HighCVSS base score
- 2.1%Exploitation in 30 daysEPSS · top 18% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- NonePublic exploitsnone known yet
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.
Timeline
ID reserved
By kubernetes
- 9 months later
· 9 months later
Published
- 3 years later
· 3 years later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| kubernetesCNA (assigner) | 3.1 | High7.6 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:L |
| NVDNVD · Modified | 3.1 | High7.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N |
- EPSS (exploitation in 30 days)
- 2.1% · top 18% of all CVEs (17 Nov 2026)
The list uses the assigner's score when there is one, then CISA's, then NVD's: High 7.6.
Affected products
Kubernetes · Kubernetes ingress-nginx
- affected unspecified – ≤ 0.49.0
- unknown next of 0.49.0 – < unspecified
- affected unspecified – ≤ 1.0.0
- unknown next of 1.0.0 – < unspecified
What to do
Workaround: This can be mitigated by disallowing snippet annotations on a supported version. Refer to https://github.com/kubernetes/ingress-nginx/issues/7837 for instructions.
References
References3
- https://groups.google.com/g/kubernetes-security-announce/c/mT4JJxi9tQY (opens in a new tab)x_refsource_MISCx_transferred
- https://github.com/kubernetes/ingress-nginx/issues/7837 (opens in a new tab)x_refsource_MISCx_transferred
- https://security.netapp.com/advisory/ntap-20211203-0001/ (opens in a new tab)x_refsource_CONFIRMx_transferred
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2021-12628 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisories (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2021-25742)Record last updated .