CVE-2021-25742

Public Exploit
Ingress-nginx custom snippets allows retrieval of ingress-nginx serviceaccount token and secrets across all namespaces

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.

Remediation

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.

Category

7.6
CVSS
Severity: High
CVSS 3.1 •
CVSS 2.0 •
EPSS 0.65%
Third-Party Advisory github.com Third-Party Advisory google.com Third-Party Advisory netapp.com
Affected: Kubernetes Kubernetes ingress-nginx
Published at:
Updated at:

References

Link Tags
https://groups.google.com/g/kubernetes-security-announce/c/mT4JJxi9tQY mailing list mitigation third party advisory
https://github.com/kubernetes/ingress-nginx/issues/7837 exploit mitigation third party advisory issue tracking
https://security.netapp.com/advisory/ntap-20211203-0001/ third party advisory

Frequently Asked Questions

What is the severity of CVE-2021-25742?
CVE-2021-25742 has been scored as a high severity vulnerability.
How to fix CVE-2021-25742?
As a workaround for remediating CVE-2021-25742: This can be mitigated by disallowing snippet annotations on a supported version. Refer to https://github.com/kubernetes/ingress-nginx/issues/7837 for instructions.
Is CVE-2021-25742 being actively exploited in the wild?
It is possible that CVE-2021-25742 is being exploited or will be exploited in a near future based on public information. According to its EPSS score, there is a ~1% probability that this vulnerability will be exploited by malicious actors in the next 30 days.
What software or system is affected by CVE-2021-25742?
CVE-2021-25742 affects Kubernetes Kubernetes ingress-nginx.
This platform uses data from the NIST NVD, MITRE CVE, MITRE CWE, First.org and CISA KEV but is not endorsed or certified by these entities. CVE is a registred trademark of the MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. CWE is a registred trademark of the MITRE Corporation and the authoritative source of CWE content is MITRE's CWE web site.
© 2025 Under My Watch. All Rights Reserved.