{"id":"CVE-2021-25748","aliases":["GHSA-863x-868h-968x"],"summary":"Ingress-nginx `path` sanitization can be bypassed with newline character","published_at":"2022-06-10T16:01:41Z","modified_at":"2026-08-07T08:12:12.689596Z","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},"fix_available":true,"kev":{"listed":false,"ransomware":false},"public_exploit":false,"exploits":[],"epss":{"score":0.006940000224858522,"percentile":0.5369700193405151,"date":"2026-11-19T00:00:00Z"},"priority":8.6,"record_count":5,"vendors":["BSI","GitHub","Kubernetes"],"details":"A security issue was discovered in ingress-nginx where a user that can create or update ingress objects can use a newline character to bypass the sanitization of the `spec.rules[].http.paths[].path` field of 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":"Go","package":"k8s.io/ingress-nginx","purl":"pkg:golang/k8s.io/ingress-nginx","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.2.1"}]}],"fixed":["1.2.1"],"provider":"osv","source":"GHSA-863x-868h-968x","relation":"self"},{"ecosystem":"NVD","package":"kubernetes:ingress-nginx","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.2.1"}]}],"fixed":["1.2.1"],"provider":"nvd","source":"CVE-2021-25748","relation":"self"}],"affected_other":[{"ecosystem":"CVE","package":"Kubernetes/Kubernetes ingress-nginx","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.2.1"}]}],"fixed":["1.2.1"],"provider":"cvelistv5","source":"CVE-2021-25748","relation":"self"}],"product_status":[],"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-25748","relation":"self","url":"https://www.cve.org/CVERecord?id=CVE-2021-25748","license":"CC-BY-4.0","published_at":"2023-05-24T00:00:00Z","modified_at":"2025-01-16T21:23:39.341Z","summary":"Ingress-nginx `path` sanitization can be bypassed with newline character","details":"A security issue was discovered in ingress-nginx where a user that can create or update ingress objects can use a newline character to bypass the sanitization of the `spec.rules[].http.paths[].path` field of 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-25748"}],"affected":[{"ecosystem":"CVE","package":"Kubernetes/Kubernetes ingress-nginx","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.2.1"}]}],"fixed":["1.2.1"],"provider":"cvelistv5","source":"CVE-2021-25748","relation":"self"}],"product_status":[],"references":[{"type":"WEB","url":"https://groups.google.com/g/kubernetes-security-announce/c/avaRYa9c7I8"},{"type":"WEB","url":"https://github.com/kubernetes/ingress-nginx/issues/8686"}]},{"provider":"kubernetes-cve-feed","source_id":"CVE-2021-25748","relation":"self","url":"https://github.com/kubernetes/kubernetes/issues/126814","license":"CC-BY-4.0","published_at":"2022-06-10T16:01:41Z","summary":"Ingress-nginx `path` sanitization can be bypassed with newline character","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 a newline character to bypass the sanitization of the `spec.rules[].http.paths[].path` field of 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-25748.\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\nIf you are running the “chrooted” ingress-nginx controller introduced in v1.2.0 (gcr.io/k8s-staging-ingress-nginx/controller-chroot), you are not affected.\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.1\r\n\r\n#### Fixed Versions\r\nv1.2.1\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 `spec.rules[].http.paths[].path` field on the networking.k8s.io/Ingress resource to known safe characters (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 [#8686](https://github.com/kubernetes/kubernetes/issues/126814) for more details.\r\n\r\n### Acknowledgements\r\nThis vulnerability was reported by Gafnit Amiga.\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-25748"}],"affected":[],"product_status":[],"references":[{"type":"ADVISORY","url":"https://github.com/kubernetes/kubernetes/issues/126814"},{"type":"ADVISORY","url":"https://www.cve.org/cverecord?id=CVE-2021-25748"},{"type":"ADVISORY","url":"https://groups.google.com/g/kubernetes-announce/search?q=CVE-2021-25748"}]},{"provider":"nvd","source_id":"CVE-2021-25748","relation":"self","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-25748","severity":[],"affected":[{"ecosystem":"NVD","package":"kubernetes:ingress-nginx","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.2.1"}]}],"fixed":["1.2.1"],"provider":"nvd","source":"CVE-2021-25748","relation":"self"}],"product_status":[],"references":[]},{"provider":"osv","source_id":"GHSA-863x-868h-968x","relation":"self","url":"https://osv.dev/vulnerability/GHSA-863x-868h-968x","license":"CC-BY-4.0","published_at":"2023-05-24T18:30:26Z","modified_at":"2026-08-07T08:12:12.689596Z","summary":"Ingress-nginx `path` sanitization can be bypassed with newline character","details":"A security issue was discovered in ingress-nginx where a user that can create or update ingress objects can use a newline character to bypass the sanitization of the `spec.rules[].http.paths[].path` field of 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:N/A:N","source":"GHSA-863x-868h-968x"}],"affected":[{"ecosystem":"Go","package":"k8s.io/ingress-nginx","purl":"pkg:golang/k8s.io/ingress-nginx","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.2.1"}]}],"fixed":["1.2.1"],"provider":"osv","source":"GHSA-863x-868h-968x","relation":"self"}],"product_status":[],"references":[{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-25748"},{"type":"WEB","url":"https://github.com/kubernetes/ingress-nginx/issues/8686"},{"type":"WEB","url":"https://github.com/kubernetes/ingress-nginx/pull/8623"},{"type":"PACKAGE","url":"https://github.com/kubernetes/ingress-nginx"},{"type":"WEB","url":"https://github.com/kubernetes/ingress-nginx/releases/tag/controller-v1.2.1"},{"type":"WEB","url":"https://groups.google.com/g/kubernetes-security-announce/c/avaRYa9c7I8"}]}],"references":[{"type":"WEB","url":"https://groups.google.com/g/kubernetes-security-announce/c/avaRYa9c7I8"},{"type":"WEB","url":"https://github.com/kubernetes/ingress-nginx/issues/8686"},{"type":"ADVISORY","url":"https://github.com/kubernetes/kubernetes/issues/126814"},{"type":"ADVISORY","url":"https://www.cve.org/cverecord?id=CVE-2021-25748"},{"type":"ADVISORY","url":"https://groups.google.com/g/kubernetes-announce/search?q=CVE-2021-25748"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-25748"},{"type":"WEB","url":"https://github.com/kubernetes/ingress-nginx/pull/8623"},{"type":"PACKAGE","url":"https://github.com/kubernetes/ingress-nginx"},{"type":"WEB","url":"https://github.com/kubernetes/ingress-nginx/releases/tag/controller-v1.2.1"}],"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-25748","url":"https://www.cve.org/CVERecord?id=CVE-2021-25748","license":"CC-BY-4.0","modified_at":"2025-01-16T21:23:39.341Z","relation":"self"},{"provider":"kubernetes-cve-feed","source_id":"CVE-2021-25748","url":"https://github.com/kubernetes/kubernetes/issues/126814","license":"CC-BY-4.0","relation":"self"},{"provider":"nvd","source_id":"CVE-2021-25748","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-25748","relation":"self"},{"provider":"osv","source_id":"GHSA-863x-868h-968x","url":"https://osv.dev/vulnerability/GHSA-863x-868h-968x","license":"CC-BY-4.0","modified_at":"2026-08-07T08:12:12.689596Z","relation":"self"}]}
