CVE-2019-10223: kube-state-metrics may expose secret content in metrics
6.5
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.77661%
CWE
Published
5/24/2022
Updated
2/17/2023
KEV Status
No
Technology
Go
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
k8s.io/kube-state-metrics | go | >= 1.7.0, < 1.7.2 | 1.7.2 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stemmed from experimental annotation exposure features added in v1.7.0. The commit diff shows removal of '*_annotations' metric generators across all resource handlers. These functions directly converted Kubernetes resource annotations into Prometheus labels without sanitization. For Secrets specifically, the default kubectl
behavior of showing decoded secret data in annotations combined with these metric generators led to secret leakage. The kubeAnnotationsToPrometheusLabels
function was the common vulnerable component across all resource types.