{"id":"CVE-2021-25742","aliases":["openSUSE-SU-2024:11726-1"],"summary":"Ingress-nginx custom snippets allows retrieval of ingress-nginx serviceaccount token and secrets across all namespaces","published_at":"2021-10-21T16:00:00Z","modified_at":"2026-02-04T03:24:53.932309Z","products":[{"slug":"ingress-nginx","name":"Ingress-NGINX","category":"kubernetes-container"}],"rating":{"severity":"high","score":7.6,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:L","attack_path":"internet_authenticated","user_interaction":false,"malicious":false,"red_hat":"Important","vendor_ratings":[{"source":"SUSE","rating":"important"},{"source":"SUSE","rating":"moderate"},{"source":"Red Hat","rating":"Important"}]},"fix_available":true,"kev":{"listed":false,"ransomware":false},"public_exploit":false,"exploits":[],"epss":{"score":0.020670000463724136,"percentile":0.818120002746582,"date":"2026-11-19T00:00:00Z"},"priority":8.6,"details":"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.","affected_stack":[{"ecosystem":"NVD","package":"kubernetes:ingress-nginx","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.49.1"}]}],"versions":["1.0.0"],"fixed":["0.49.1"],"provider":"nvd","source":"CVE-2021-25742","relation":"self"}],"affected_other":[{"ecosystem":"CVE","package":"Kubernetes/Kubernetes ingress-nginx","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"0.49.0"}]},{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"1.0.0"}]}],"provider":"cvelistv5","source":"CVE-2021-25742","relation":"self"},{"ecosystem":"openSUSE:Tumbleweed","package":"rke","purl":"pkg:rpm/opensuse/rke&distro=openSUSE%20Tumbleweed","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.3.3-1.1"}]}],"fixed":["1.3.3-1.1"],"provider":"osv","source":"openSUSE-SU-2024:11726-1","relation":"self"}],"product_status":[{"vendor":"SUSE","product":"openSUSE Tumbleweed","cpe":"cpe:/o:opensuse:tumbleweed","status":"fixed","packages":["rke"],"package_count":1,"fixed":["rke-1.3.3-1.1"],"advisories":[],"provider":"csaf-suse","source":"CVE-2021-25742"},{"vendor":"Red Hat","product":"Red Hat Advanced Cluster Management for Kubernetes 2","cpe":"cpe:/a:redhat:acm:2","status":"not_affected","packages":["rhacm2/management-ingress-rhel8"],"package_count":1,"fixed":[],"advisories":[],"note":"vulnerable_code_not_present","provider":"redhat-vex","source":"CVE-2021-25742"},{"vendor":"Red Hat","product":"Red Hat OpenShift Container Platform 3.11","cpe":"cpe:/a:redhat:openshift:3.11","status":"not_affected","packages":["atomic-openshift","atomic-openshift-clients","atomic-openshift-clients-redistributable","atomic-openshift-docker-excluder","atomic-openshift-excluder","atomic-openshift-hyperkube","atomic-openshift-hypershift","atomic-openshift-master","atomic-openshift-node","atomic-openshift-pod","atomic-openshift-sdn-ovs","atomic-openshift-template-service-broker","atomic-openshift-tests"],"package_count":13,"fixed":[],"advisories":[],"note":"vulnerable_code_not_present","provider":"redhat-vex","source":"CVE-2021-25742"},{"vendor":"Red Hat","product":"Red Hat OpenShift Container Platform 4","cpe":"cpe:/a:redhat:openshift:4","status":"not_affected","packages":["openshift","openshift-clients","openshift-clients-redistributable","openshift-hyperkube","openshift-kube-apiserver","openshift-kube-controller-manager","openshift-kube-scheduler","openshift-kubelet"],"package_count":8,"fixed":[],"advisories":[],"note":"vulnerable_code_not_present","provider":"redhat-vex","source":"CVE-2021-25742"}],"records":[{"provider":"cvelistv5","source_id":"CVE-2021-25742","relation":"self","url":"https://www.cve.org/CVERecord?id=CVE-2021-25742","license":"CC-BY-4.0","published_at":"2021-10-29T04:05:10.713Z","modified_at":"2024-09-16T23:06:12.392Z","summary":"Ingress-nginx custom snippets allows retrieval of ingress-nginx serviceaccount token and secrets across all namespaces","details":"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.","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:L","source":"CVE-2021-25742"}],"affected":[{"ecosystem":"CVE","package":"Kubernetes/Kubernetes ingress-nginx","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"0.49.0"}]},{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"1.0.0"}]}],"provider":"cvelistv5","source":"CVE-2021-25742","relation":"self"}],"product_status":[],"references":[{"type":"WEB","url":"https://groups.google.com/g/kubernetes-security-announce/c/mT4JJxi9tQY"},{"type":"WEB","url":"https://github.com/kubernetes/ingress-nginx/issues/7837"},{"type":"WEB","url":"https://security.netapp.com/advisory/ntap-20211203-0001/"}]},{"provider":"csaf-suse","source_id":"CVE-2021-25742","relation":"self","url":"https://www.suse.com/security/cve/CVE-2021-25742/","license":"TLP:CLEAR, mirroring permitted","published_at":"2023-02-15T03:44:57Z","modified_at":"2025-03-15T09:06:19Z","summary":"SUSE CVE CVE-2021-25742","details":"SUSE CVE-2021-25742\n\nA 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.","severity":[{"type":"SUSE","score":"important","source":"CVE-2021-25742"}],"affected":[],"product_status":[{"vendor":"SUSE","product":"openSUSE Tumbleweed","cpe":"cpe:/o:opensuse:tumbleweed","status":"fixed","packages":["rke"],"package_count":1,"fixed":["rke-1.3.3-1.1"],"advisories":[],"provider":"csaf-suse","source":"CVE-2021-25742"}],"references":[{"type":"WEB","url":"https://www.suse.com/security/cve/CVE-2021-25742"},{"type":"WEB","url":"https://www.suse.com/support/security/rating/"}]},{"provider":"csaf-suse","source_id":"openSUSE-SU-2024:11726-1","relation":"self","url":"https://www.suse.com/security/cve/CVE-2021-25742/","license":"TLP:CLEAR, mirroring permitted","published_at":"2024-06-15T00:00:00Z","modified_at":"2024-06-15T00:00:00Z","summary":"rke-1.3.3-1.1 on GA media","details":"rke-1.3.3-1.1 on GA media\n\nThese are all security issues fixed in the rke-1.3.3-1.1 package on the GA media of openSUSE Tumbleweed.","severity":[{"type":"SUSE","score":"moderate","source":"openSUSE-SU-2024:11726-1"}],"affected":[],"product_status":[],"references":[{"type":"WEB","url":"https://www.suse.com/support/security/rating/"},{"type":"WEB","url":"https://ftp.suse.com/pub/projects/security/csaf/2024/opensuse-su-2024_11726-1.json"},{"type":"WEB","url":"https://www.suse.com/security/cve/CVE-2021-25742/"},{"type":"WEB","url":"https://www.suse.com/security/cve/CVE-2021-25742"}]},{"provider":"kubernetes-cve-feed","source_id":"CVE-2021-25742","relation":"self","url":"https://github.com/kubernetes/kubernetes/issues/126811","license":"CC-BY-4.0","published_at":"2021-10-21T16:08:21Z","summary":"Ingress-nginx custom snippets allows retrieval of ingress-nginx serviceaccount token and secrets across all namespaces","details":"### Issue Details\r\nA 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.\r\n\r\nThis issue has been rated **High** ([CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:L](https://www.first.org/cvss/calculator/3.1#CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:L)), and assigned **CVE-2021-25742**.\r\n\r\n### Affected Components and Configurations\r\nThis bug affects ingress-nginx.\r\n\r\nMultitenant environments where non-admin users have permissions to create Ingress objects are most affected by this issue.\r\n\r\n#### Affected Versions with no mitigation\r\n\r\n- v1.0.0\r\n- <= v0.49.0\r\n\r\n#### Versions allowing mitigation\r\nThis issue cannot be fixed solely by upgrading ingress-nginx. It can be mitigated in the following versions:\r\n- v1.0.1\r\n- v0.49.1\r\n\r\n### Mitigation\r\nTo mitigate this vulnerability:\r\n1. Upgrade to a version that allows mitigation, (>= v0.49.1 or >= v1.0.1)\r\n2. Set [allow-snippet-annotations](https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/configmap/#allow-snippet-annotations) to false in your ingress-nginx ConfigMap based on how you deploy ingress-nginx:\r\n\r\n    **Static Deploy Files** \r\n    Edit the ConfigMap for ingress-nginx **after** deployment:\r\n    ```\r\n    kubectl edit configmap -n ingress-nginx ingress-nginx-controller\r\n    ```\r\n    Add directive:\r\n    ````\r\n    data:\r\n      allow-snippet-annotations: “false”\r\n     ````\r\n    More information on the ConfigMap [here](https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/configmap/) \r\n\r\n    **Deploying Via Helm**\r\n    Set `controller.allowSnippetAnnotations` to `false` in the Values.yaml or add the directive to the helm deploy:\r\n    ```\r\n    helm install [RELEASE_NAME] --set controller.allowSnippetAnnotations=false ingress-nginx/ingress-nginx\r\n    ````\r\n\r\n    [https://github.com/kubernetes/ingress-nginx/blob/controller-v1.0.1/charts/ingress-nginx/values.yaml#L76](https://github.com/kubernetes/ingress-nginx/blob/controller-v1.0.1/charts/ingress-nginx/values.yaml#L76)\r\n\r\n### Detection\r\nIf you find evidence that this vulnerability has been exploited, please contact security@kubernetes.io\r\nAdditional Details\r\nSee ingress-nginx Issue kubernetes/kubernetes#126811 for more details.\r\n\r\n### Acknowledgements\r\nThis vulnerability was reported by Mitch Hulscher.\r\n\r\nThank You,\r\nCJ Cullen on behalf of the Kubernetes Security Response Committee","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:L","source":"CVE-2021-25742"}],"affected":[],"product_status":[],"references":[{"type":"ADVISORY","url":"https://github.com/kubernetes/kubernetes/issues/126811"},{"type":"ADVISORY","url":"https://www.cve.org/cverecord?id=CVE-2021-25742"},{"type":"ADVISORY","url":"https://groups.google.com/g/kubernetes-announce/search?q=CVE-2021-25742"}]},{"provider":"nvd","source_id":"CVE-2021-25742","relation":"self","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-25742","severity":[],"affected":[{"ecosystem":"NVD","package":"kubernetes:ingress-nginx","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.49.1"}]}],"versions":["1.0.0"],"fixed":["0.49.1"],"provider":"nvd","source":"CVE-2021-25742","relation":"self"}],"product_status":[],"references":[]},{"provider":"osv","source_id":"openSUSE-SU-2024:11726-1","relation":"self","url":"https://osv.dev/vulnerability/openSUSE-SU-2024:11726-1","published_at":"2024-06-15T00:00:00Z","modified_at":"2026-02-04T03:24:53.932309Z","summary":"rke-1.3.3-1.1 on GA media","details":"These are all security issues fixed in the rke-1.3.3-1.1 package on the GA media of openSUSE Tumbleweed.","severity":[],"affected":[{"ecosystem":"openSUSE:Tumbleweed","package":"rke","purl":"pkg:rpm/opensuse/rke&distro=openSUSE%20Tumbleweed","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.3.3-1.1"}]}],"fixed":["1.3.3-1.1"],"provider":"osv","source":"openSUSE-SU-2024:11726-1","relation":"self"}],"product_status":[],"references":[{"type":"ADVISORY","url":""},{"type":"WEB","url":"https://www.suse.com/security/cve/CVE-2021-25742"}]},{"provider":"redhat-vex","source_id":"CVE-2021-25742","relation":"self","url":"https://access.redhat.com/security/cve/CVE-2021-25742","license":"CC-BY-4.0","published_at":"2021-10-21T16:00:00Z","modified_at":"2023-02-27T13:38:36Z","summary":"k8s.io/ingress-nginx: Custom snippets allows retrieval of ingress-nginx serviceaccount token and secrets across all namespaces","details":"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.","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:L","source":"CVE-2021-25742"},{"type":"Red Hat","score":"Important","source":"CVE-2021-25742"}],"affected":[],"product_status":[{"vendor":"Red Hat","product":"Red Hat Advanced Cluster Management for Kubernetes 2","cpe":"cpe:/a:redhat:acm:2","status":"not_affected","packages":["rhacm2/management-ingress-rhel8"],"package_count":1,"fixed":[],"advisories":[],"note":"vulnerable_code_not_present","provider":"redhat-vex","source":"CVE-2021-25742"},{"vendor":"Red Hat","product":"Red Hat OpenShift Container Platform 3.11","cpe":"cpe:/a:redhat:openshift:3.11","status":"not_affected","packages":["atomic-openshift","atomic-openshift-clients","atomic-openshift-clients-redistributable","atomic-openshift-docker-excluder","atomic-openshift-excluder","atomic-openshift-hyperkube","atomic-openshift-hypershift","atomic-openshift-master","atomic-openshift-node","atomic-openshift-pod","atomic-openshift-sdn-ovs","atomic-openshift-template-service-broker","atomic-openshift-tests"],"package_count":13,"fixed":[],"advisories":[],"note":"vulnerable_code_not_present","provider":"redhat-vex","source":"CVE-2021-25742"},{"vendor":"Red Hat","product":"Red Hat OpenShift Container Platform 4","cpe":"cpe:/a:redhat:openshift:4","status":"not_affected","packages":["openshift","openshift-clients","openshift-clients-redistributable","openshift-hyperkube","openshift-kube-apiserver","openshift-kube-controller-manager","openshift-kube-scheduler","openshift-kubelet"],"package_count":8,"fixed":[],"advisories":[],"note":"vulnerable_code_not_present","provider":"redhat-vex","source":"CVE-2021-25742"}],"references":[{"type":"WEB","url":"https://security.access.redhat.com/data/csaf/v2/vex/2021/cve-2021-25742.json"},{"type":"WEB","url":"https://access.redhat.com/security/cve/CVE-2021-25742"},{"type":"WEB","url":"https://bugzilla.redhat.com/show_bug.cgi?id=2012036"},{"type":"WEB","url":"https://www.cve.org/CVERecord?id=CVE-2021-25742"},{"type":"WEB","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-25742"},{"type":"WEB","url":"https://groups.google.com/g/kubernetes-security-announce/c/mT4JJxi9tQY"}]}],"references":[{"type":"WEB","url":"https://groups.google.com/g/kubernetes-security-announce/c/mT4JJxi9tQY"},{"type":"WEB","url":"https://github.com/kubernetes/ingress-nginx/issues/7837"},{"type":"WEB","url":"https://security.netapp.com/advisory/ntap-20211203-0001/"},{"type":"WEB","url":"https://www.suse.com/security/cve/CVE-2021-25742"},{"type":"WEB","url":"https://www.suse.com/support/security/rating/"},{"type":"WEB","url":"https://ftp.suse.com/pub/projects/security/csaf/2024/opensuse-su-2024_11726-1.json"},{"type":"WEB","url":"https://www.suse.com/security/cve/CVE-2021-25742/"},{"type":"ADVISORY","url":"https://github.com/kubernetes/kubernetes/issues/126811"},{"type":"ADVISORY","url":"https://www.cve.org/cverecord?id=CVE-2021-25742"},{"type":"ADVISORY","url":"https://groups.google.com/g/kubernetes-announce/search?q=CVE-2021-25742"},{"type":"ADVISORY","url":""},{"type":"WEB","url":"https://security.access.redhat.com/data/csaf/v2/vex/2021/cve-2021-25742.json"},{"type":"WEB","url":"https://access.redhat.com/security/cve/CVE-2021-25742"},{"type":"WEB","url":"https://bugzilla.redhat.com/show_bug.cgi?id=2012036"},{"type":"WEB","url":"https://www.cve.org/CVERecord?id=CVE-2021-25742"},{"type":"WEB","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-25742"}],"sources":[{"provider":"cvelistv5","source_id":"CVE-2021-25742","url":"https://www.cve.org/CVERecord?id=CVE-2021-25742","license":"CC-BY-4.0","modified_at":"2024-09-16T23:06:12.392Z","relation":"self"},{"provider":"csaf-suse","source_id":"CVE-2021-25742","url":"https://www.suse.com/security/cve/CVE-2021-25742/","license":"TLP:CLEAR, mirroring permitted","modified_at":"2025-03-15T09:06:19Z","relation":"self"},{"provider":"csaf-suse","source_id":"openSUSE-SU-2024:11726-1","url":"https://www.suse.com/security/cve/CVE-2021-25742/","license":"TLP:CLEAR, mirroring permitted","modified_at":"2024-06-15T00:00:00Z","relation":"self"},{"provider":"kubernetes-cve-feed","source_id":"CVE-2021-25742","url":"https://github.com/kubernetes/kubernetes/issues/126811","license":"CC-BY-4.0","relation":"self"},{"provider":"nvd","source_id":"CVE-2021-25742","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-25742","relation":"self"},{"provider":"osv","source_id":"openSUSE-SU-2024:11726-1","url":"https://osv.dev/vulnerability/openSUSE-SU-2024:11726-1","modified_at":"2026-02-04T03:24:53.932309Z","relation":"self"},{"provider":"redhat-vex","source_id":"CVE-2021-25742","url":"https://access.redhat.com/security/cve/CVE-2021-25742","license":"CC-BY-4.0","modified_at":"2023-02-27T13:38:36Z","relation":"self"}]}
