Miggo Logo

CVE-2019-10223: kube-state-metrics may expose secret content in metrics

6.5

CVSS Score
3.1

Basic Information

EPSS Score
0.77661%
Published
5/24/2022
Updated
2/17/2023
KEV Status
No
Technology
TechnologyGo

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
k8s.io/kube-state-metricsgo>= 1.7.0, < 1.7.21.7.2

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot 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.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

* s**urity issu* w*s *is*ov*r** in t** ku**-st*t*-m*tri*s v*rsions v*.*.* *n* v*.*.*. *n *xp*rim*nt*l ***tur* w*s ***** to t** v*.*.* r*l**s* t**t *n**l** *nnot*tions to ** *xpos** *s m*tri*s. *y ****ult, t** ku**-st*t*-m*tri*s m*tri*s only *xpos* m*

Reasoning

T** vuln*r**ility st*mm** *rom *xp*rim*nt*l *nnot*tion *xposur* ***tur*s ***** in v*.*.*. T** *ommit *i** s*ows r*mov*l o* '*_*nnot*tions' m*tri* **n*r*tors **ross *ll r*sour** **n*l*rs. T**s* *un*tions *ir**tly *onv*rt** Ku**rn*t*s r*sour** *nnot*ti