VDB
Sign up
MEDIUM6.5

GHSA-c92w-72c5-9x59

kube-state-metrics may expose secret content in metrics

Quick fix

GHSA-c92w-72c5-9x59 — k8s.io/kube-state-metrics: upgrade to the fixed version with the command below.

go get k8s.io/kube-state-metrics@v1.7.2

Details

A security issue was discovered in the kube-state-metrics versions v1.7.0 and v1.7.1. An experimental feature was added to the v1.7.0 release that enabled annotations to be exposed as metrics. By default, the kube-state-metrics metrics only expose metadata about Secrets. However, a combination of the default `kubectl` behavior and this new feature can cause the entire secret content to end up in metric labels thus inadvertently exposing the secret content in metrics. This feature has been reverted and released as the v1.7.2 release. If you are running the v1.7.0 or v1.7.1 release, please upgrade to the v1.7.2 release as soon as possible.

Are you affected?

Enter the version of the package you're using.

Affected packages

Go/k8s.io/kube-state-metrics
Introduced in: 1.7.0Fixed in: 1.7.2
Fixgo get k8s.io/kube-state-metrics@v1.7.2

References