CVE-2021-25745 Ingress-nginx path can be pointed to service account token file

High 7.6 Published Updated

Attackers with ingress creation rights can access controller service account tokens, potentially reading all cluster secrets.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2021-25745?

CVE-2021-25745 is a high-severity vulnerability in Kubernetes ingress-nginx, published on 6 May 2022. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

A security issue was discovered in ingress-nginx where a user that can create or update ingress objects can use 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.

Weakness: CWE-20

Which versions are affected by CVE-2021-25745?

2 open source packages ship an affected version, including k8s.io/ingress-nginx. It affects 1 product.

PackageAffectedFixed in
k8s.io/ingress-nginx GoAll versions1.2.0
k8s.io/ingress-nginx GoAll versions1.2.0
Linux distribution packages (1)
rke openSUSE:TumbleweedAll versions1.3.10-1.1

Products include Kubernetes Ingress-Nginx.

How do I fix CVE-2021-25745?

Upgrade k8s.io/ingress-nginx to 1.2.0 or later.

Is CVE-2021-25745 being exploited?

There is no known exploitation of CVE-2021-25745 in the wild and no public exploit code.

Sources

Also known as GHSA-pvmg-xgmx-9mxh, openSUSE-SU-2024:12031-1.

Is CVE-2021-25745 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free