{"id":"CVE-2021-25746","aliases":[],"summary":"Ingress-nginx directive injection via annotations","published_at":"2022-04-22T16:00:00Z","modified_at":"2026-02-02T07:28:13.802461Z","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":"Red Hat","rating":"Important"}]},"fix_available":true,"kev":{"listed":false,"ransomware":false},"public_exploit":false,"exploits":[],"epss":{"score":0.014360000379383564,"percentile":0.736810028553009,"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 .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.","affected_stack":[{"ecosystem":"NVD","package":"kubernetes:ingress-nginx","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.2.0"}]}],"fixed":["1.2.0"],"provider":"nvd","source":"CVE-2021-25746","relation":"self"}],"affected_other":[{"ecosystem":"CVE","package":"Kubernetes/Kubernetes ingress-nginx","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.2.0"}]}],"fixed":["1.2.0"],"provider":"cvelistv5","source":"CVE-2021-25746","relation":"self"}],"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-25746"}],"records":[{"provider":"csaf-bsi","source_id":"WID-SEC-W-2024-1591","relation":"upstream","url":"https://wid.cert-bund.de/portal/wid/securityadvisory?name=WID-SEC-2024-1591","license":"TLP:CLEAR, mirroring permitted","published_at":"2024-07-10T22:00:00Z","modified_at":"2024-11-11T23:00:00Z","summary":"Juniper JUNOS: Mehrere Schwachstellen","details":"Ein Angreifer kann mehrere Schwachstellen in Juniper JUNOS ausnutzen, um einen Denial of Service  zu verursachen, Informationen offenzulegen, Privilegien zu erweitern und Sicherheitsmechanismen inklusive zu umgehen.\n\nJUNOS ist das \"Juniper Network Operating System\", das in Juniper Appliances verwendet wird.","severity":[{"type":"BSI","score":"mittel","source":"WID-SEC-W-2024-1591"}],"affected":[],"product_status":[],"references":[{"type":"WEB","url":"https://wid.cert-bund.de/.well-known/csaf/white/2024/wid-sec-w-2024-1591.json"},{"type":"WEB","url":"https://wid.cert-bund.de/portal/wid/securityadvisory?name=WID-SEC-2024-1591"},{"type":"WEB","url":"https://supportportal.juniper.net/s/global-search/%40uri?language=en_US#sort=%40sfcec_community_publish_date_formula__c%20descending&numberOfResults=100&f:ctype=%5BSecurity%20Advisories%5D"}]},{"provider":"cvelistv5","source_id":"CVE-2021-25746","relation":"self","url":"https://www.cve.org/CVERecord?id=CVE-2021-25746","license":"CC-BY-4.0","published_at":"2022-05-06T00:50:15.541Z","modified_at":"2024-09-17T03:48:11.881Z","summary":"Ingress-nginx directive injection via annotations","details":"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.","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-25746"}],"affected":[{"ecosystem":"CVE","package":"Kubernetes/Kubernetes ingress-nginx","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.2.0"}]}],"fixed":["1.2.0"],"provider":"cvelistv5","source":"CVE-2021-25746","relation":"self"}],"product_status":[],"references":[{"type":"WEB","url":"https://groups.google.com/g/kubernetes-security-announce/c/hv2-SfdqcfQ"},{"type":"WEB","url":"https://github.com/kubernetes/ingress-nginx/issues/8503"},{"type":"WEB","url":"https://security.netapp.com/advisory/ntap-20220609-0006/"}]},{"provider":"kubernetes-cve-feed","source_id":"CVE-2021-25746","relation":"self","url":"https://github.com/kubernetes/kubernetes/issues/126813","license":"CC-BY-4.0","published_at":"2022-04-22T16:18:27Z","summary":"Ingress-nginx directive injection via annotations","details":"### Issue Details\r\nA security issue was discovered in [ingress-nginx](https://github.com/kubernetes/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.\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-25746**.\r\n\r\n### Affected Components and Configurations\r\nThis bug affects ingress-nginx. If you do not have ingress-nginx installed on your cluster, you are not affected. You can check this by running `kubectl get po -n 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\r\n- <v1.2.0\r\n\r\n#### Fixed Versions\r\n- v1.2.0-beta.0\r\n- v1.2.0\r\n\r\n### Mitigation\r\nIf you are unable to roll out the fix, this vulnerability can be mitigated by implementing an admission policy that restricts the `metadata.annotations` values to known safe (see the newly added [rules](https://github.com/kubernetes/ingress-nginx/blame/main/internal/ingress/inspector/rules.go), or the suggested value for [annotation-value-word-blocklist](https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/configmap/#annotation-value-word-blocklist)).\r\n\r\n### Detection\r\nIf you find evidence that this vulnerability has been exploited, please contact [security@kubernetes.io](mailto:security@kubernetes.io)\r\n\r\n### Additional Details\r\nSee ingress-nginx Issue [#8503](https://github.com/kubernetes/kubernetes/issues/126813) for more details.\r\n\r\n### Acknowledgements\r\nThis vulnerability was reported by Anthony Weems, and separately by jeffrey&oliver.\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-25746"}],"affected":[],"product_status":[],"references":[{"type":"ADVISORY","url":"https://github.com/kubernetes/kubernetes/issues/126813"},{"type":"ADVISORY","url":"https://www.cve.org/cverecord?id=CVE-2021-25746"},{"type":"ADVISORY","url":"https://groups.google.com/g/kubernetes-announce/search?q=CVE-2021-25746"}]},{"provider":"nvd","source_id":"CVE-2021-25746","relation":"self","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-25746","severity":[],"affected":[{"ecosystem":"NVD","package":"kubernetes:ingress-nginx","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.2.0"}]}],"fixed":["1.2.0"],"provider":"nvd","source":"CVE-2021-25746","relation":"self"}],"product_status":[],"references":[]},{"provider":"redhat-vex","source_id":"CVE-2021-25746","relation":"self","url":"https://access.redhat.com/security/cve/CVE-2021-25746","license":"CC-BY-4.0","published_at":"2022-04-22T16:00:00Z","modified_at":"2026-02-02T07:28:13.802461Z","summary":"k8s.io/ingress-nginx: directive injection via annotations","details":"A flaw was found in the ingress-nginx controller. When a user creates or updates ingress objects, credentials of the ingress-nginx controller can be obtained by accessing .metadata.annotations.","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N","source":"CVE-2021-25746"},{"type":"Red Hat","score":"Important","source":"CVE-2021-25746"}],"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-25746"}],"references":[{"type":"WEB","url":"https://security.access.redhat.com/data/csaf/v2/vex/2021/cve-2021-25746.json"},{"type":"WEB","url":"https://access.redhat.com/security/cve/CVE-2021-25746"},{"type":"WEB","url":"https://bugzilla.redhat.com/show_bug.cgi?id=2076618"},{"type":"WEB","url":"https://www.cve.org/CVERecord?id=CVE-2021-25746"},{"type":"WEB","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-25746"}]}],"references":[{"type":"WEB","url":"https://groups.google.com/g/kubernetes-security-announce/c/hv2-SfdqcfQ"},{"type":"WEB","url":"https://github.com/kubernetes/ingress-nginx/issues/8503"},{"type":"WEB","url":"https://security.netapp.com/advisory/ntap-20220609-0006/"},{"type":"ADVISORY","url":"https://github.com/kubernetes/kubernetes/issues/126813"},{"type":"ADVISORY","url":"https://www.cve.org/cverecord?id=CVE-2021-25746"},{"type":"ADVISORY","url":"https://groups.google.com/g/kubernetes-announce/search?q=CVE-2021-25746"},{"type":"WEB","url":"https://security.access.redhat.com/data/csaf/v2/vex/2021/cve-2021-25746.json"},{"type":"WEB","url":"https://access.redhat.com/security/cve/CVE-2021-25746"},{"type":"WEB","url":"https://bugzilla.redhat.com/show_bug.cgi?id=2076618"},{"type":"WEB","url":"https://www.cve.org/CVERecord?id=CVE-2021-25746"},{"type":"WEB","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-25746"}],"sources":[{"provider":"csaf-bsi","source_id":"WID-SEC-W-2024-1591","url":"https://wid.cert-bund.de/portal/wid/securityadvisory?name=WID-SEC-2024-1591","license":"TLP:CLEAR, mirroring permitted","modified_at":"2024-11-11T23:00:00Z","relation":"upstream"},{"provider":"cvelistv5","source_id":"CVE-2021-25746","url":"https://www.cve.org/CVERecord?id=CVE-2021-25746","license":"CC-BY-4.0","modified_at":"2024-09-17T03:48:11.881Z","relation":"self"},{"provider":"kubernetes-cve-feed","source_id":"CVE-2021-25746","url":"https://github.com/kubernetes/kubernetes/issues/126813","license":"CC-BY-4.0","relation":"self"},{"provider":"nvd","source_id":"CVE-2021-25746","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-25746","relation":"self"},{"provider":"redhat-vex","source_id":"CVE-2021-25746","url":"https://access.redhat.com/security/cve/CVE-2021-25746","license":"CC-BY-4.0","modified_at":"2026-02-02T07:28:13.802461Z","relation":"self"}]}
