# CVE-2019-10223: Duplicate Advisory: k8s.io/kube-state-metrics Exposure of Sensitive Information

> An experimental feature in kube-state-metrics could expose secret contents in metrics, allowing attackers to read sensitive data.

- **Severity:** Medium 5.3 (`CVSS:3.0/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 5 Nov 2019
- **Updated:** 4 Aug 2024
- **Also known as:** CVE-2019-17110, GHSA-2v6x-frw8-7r7f, GHSA-c92w-72c5-9x59

## What is CVE-2019-10223?

CVE-2019-10223 is a medium-severity vulnerability in Redhat Openshift Container Platform, published on 5 Nov 2019. Any signed-in user can exploit it over the network, with no action from the victim.

### Official 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.

Weakness: CWE-200 (Exposure of Sensitive Information to an Unauthorized Actor)

## Which versions are affected by CVE-2019-10223?

6 open source packages ship an affected version, including k8s.io/kube-state-metrics and github.com/kubernetes/kube-state-metrics. It affects 2 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `k8s.io/kube-state-metrics` | Go | From 1.7.0 | 1.7.2 |
| `k8s.io/kube-state-metrics` | Go | From 1.7.0 | 1.7.2 |
| `k8s.io/kube-state-metrics` | Go | From 1.7.0 | 1.7.2 |
| `k8s.io/kube-state-metrics` | Go | From 1.7.0 | 1.7.2 |
| `github.com/kubernetes/kube-state-metrics` | Go | From 1.7.0 | 1.7.2 |
| `github.com/kubernetes/kube-state-metrics` | Go | From 1.7.0 | 1.7.2 |

Products: Kubernetes Kube-State-Metrics, Redhat Openshift Container Platform.

## How do I fix CVE-2019-10223?

Upgrade k8s.io/kube-state-metrics to 1.7.2 or later.

## Is CVE-2019-10223 being exploited?

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

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2019-10223 and fix it if it is affected.

What it is: CVE-2019-10223 is a medium-severity vulnerability in Redhat Openshift Container Platform, published on 5 Nov 2019. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2019-10223 in the wild and no public exploit code.

Affected packages and fixed versions:
- k8s.io/kube-state-metrics (Go): affected from 1.7.0; fixed in 1.7.2
- k8s.io/kube-state-metrics (Go): affected from 1.7.0; fixed in 1.7.2
- k8s.io/kube-state-metrics (Go): affected from 1.7.0; fixed in 1.7.2
- k8s.io/kube-state-metrics (Go): affected from 1.7.0; fixed in 1.7.2
- github.com/kubernetes/kube-state-metrics (Go): affected from 1.7.0; fixed in 1.7.2
- github.com/kubernetes/kube-state-metrics (Go): affected from 1.7.0; fixed in 1.7.2

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2019-10223/ (Markdown: https://insights.sbomify.com/CVE-2019-10223/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2019-10223
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2019-10223
- OSV: https://osv.dev/vulnerability/CVE-2019-10223

---
From sbomify Insights: https://insights.sbomify.com/CVE-2019-10223/
Summaries are generated and may contain mistakes; the official description above is the record.
