CVE-2021-25748: Ingress-nginx `path` sanitization can be bypassed with newline character
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 Software
Event History
Frequently Asked Questions
What is CVE-2021-25748?
CVE-2021-25748 is a security vulnerability in ingress-nginx that allows a user to bypass sanitization and obtain credentials by using a newline character in the 'spec.rules[].http.paths[].path' field of an Ingress object.
What is the severity of CVE-2021-25748?
The severity of CVE-2021-25748 is medium with a CVSS score of 6.5.
How can a user exploit CVE-2021-25748?
A user can exploit CVE-2021-25748 by creating or updating ingress objects and using a newline character in the 'spec.rules[].http.paths[].path' field.
Which software is affected by CVE-2021-25748?
The software affected by CVE-2021-25748 is the k8s.io/ingress-nginx package version up to exclusive 1.2.1 and Kubernetes Ingress-nginx version up to exclusive 1.2.1.
How do I remediate CVE-2021-25748?
To remediate CVE-2021-25748, update the k8s.io/ingress-nginx package to version 1.2.1 or higher.