kube-state-metrics may expose secret content in metricsGHSA-c92w-72c5-9x59
MEDIUMFix: kubernetes/kube-state-metrics@03122feGHSA-c92w-72c5-9x59 is a medium-severity (CVSS 6.5) Information Exposure vulnerability in k8s.io/kube-state-metrics. 1 public exploit or proof-of-concept reference is indexed, so weaponization risk is real. A fix is available for k8s.io/kube-state-metrics — see the affected versions and patch details below.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
k8s.io/kube-state-metricsReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.
Description
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.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | k8s.io/kube-state-metrics | ≥ 1.7.0&&< 1.7.2 | 1.7.2go get k8s.io/kube-state-metrics@v1.7.2 |
Affected Products
kube-state-metricskubernetesopenshift container platformredhatResearch use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for k8s.io/kube-state-metrics, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update k8s.io/kube-state-metrics to 1.7.2 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-c92w-72c5-9x59 is resolved across your whole dependency graph.
Workarounds
Assume what was exposed is already known: rotate any credential, token or key that the affected component could return, restrict the endpoint to callers that genuinely need it, and strip sensitive fields from responses and error output at the boundary rather than relying on the client not to read them.
Frequently Asked Questions
Is GHSA-c92w-72c5-9x59 in your dependencies?
Find it across Go, including transitive dependencies.