# CVE-2025-5187: Nodes can delete themselves by adding an OwnerReference

> A node can delete itself by adding an OwnerReference to a non-existent cluster-scoped resource, causing garbage collection to remove the node object.

- **Severity:** Medium 6.7 (`CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:L`)
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 27 Aug 2025
- **Updated:** 26 Feb 2026
- **Also known as:** CLEANSTART-2026-GU62349, CLEANSTART-2026-JX65599, DEBIAN-CVE-2025-5187, ECHO-17d8-7195-e729, GHSA-4x4m-3c2p-qppc, GO-2025-3915, MINI-28xq-gmqc-62qv, MINI-384g-ww39-phhx, MINI-62hr-28p9-7886, MINI-6vcp-gg4q-6xmh, MINI-6vp8-9966-2vf9, MINI-73m3-w5m6-4jf5, MINI-76wr-4388-759f, MINI-855g-m7rg-gvhj, MINI-97rx-m573-h9cc, MINI-c9v4-jqm4-xq2h, MINI-cjhm-rqcm-q5vw, MINI-gfvx-f8p9-2j69, MINI-jw9x-r69w-7x43, MINI-m3g3-2wqc-mwrw, MINI-m778-24hm-h75w, MINI-p6wv-r3c6-r569, MINI-qgvp-9v3r-m7wq, MINI-r83w-mv42-3jpw, MINI-rq6p-22c7-j77w, MINI-v426-2p78-9m89, MINI-vmg2-v6xj-fjfh, MINI-whgw-9958-vc9x, MINI-wpfx-899x-cjpg, MINI-wvw4-2fwp-pvw5, OESA-2025-2280, OESA-2025-2281, OESA-2025-2282, OESA-2025-2283, OESA-2025-2284, OESA-2025-2318

## What is CVE-2025-5187?

CVE-2025-5187 is a medium-severity missing authorization vulnerability in Kubernetes, published on 27 Aug 2025. An attacker needs administrator access to exploit it, with no action from the victim.

### Official description

A vulnerability exists in the NodeRestriction admission controller in Kubernetes clusters where node users can delete their corresponding node object by patching themselves with an OwnerReference to a cluster-scoped resource. If the OwnerReference resource does not exist or is subsequently deleted, the given node object will be deleted via garbage collection.

Weakness: CWE-863 (Incorrect Authorization)

## Which versions are affected by CVE-2025-5187?

7 open source packages ship an affected version, including k8s.io/kubernetes.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `k8s.io/kubernetes` | Go | All versions | 1.31.12, 1.32.8, 1.33.4 |
| `k8s.io/kubernetes` | Go | All versions | 1.31.12 |
| `k8s.io/kubernetes` | Go | All versions | 1.31.12 |
| `k8s.io/kubernetes` | Go | From 1.32.0-alpha.0 | 1.32.8 |
| `k8s.io/kubernetes` | Go | From 1.32.0-alpha.0 | 1.32.8 |
| `k8s.io/kubernetes` | Go | From 1.33.0-alpha.0 | 1.33.4 |
| `k8s.io/kubernetes` | Go | From 1.33.0-alpha.0 | 1.33.4 |

## How do I fix CVE-2025-5187?

Upgrade k8s.io/kubernetes to a fixed version for your release line: 1.31.12, 1.32.8 or 1.33.4.

## Is CVE-2025-5187 being exploited?

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

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-5187 and fix it if it is affected.

What it is: CVE-2025-5187 is a medium-severity missing authorization vulnerability in Kubernetes, published on 27 Aug 2025. An attacker needs administrator access to exploit it, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2025-5187 in the wild and no public exploit code.

Affected packages and fixed versions:
- k8s.io/kubernetes (Go): affected all versions; fixed in 1.31.12, 1.32.8, 1.33.4
- k8s.io/kubernetes (Go): affected all versions; fixed in 1.31.12
- k8s.io/kubernetes (Go): affected all versions; fixed in 1.31.12
- k8s.io/kubernetes (Go): affected from 1.32.0-alpha.0; fixed in 1.32.8
- k8s.io/kubernetes (Go): affected from 1.32.0-alpha.0; fixed in 1.32.8
- k8s.io/kubernetes (Go): affected from 1.33.0-alpha.0; fixed in 1.33.4
- k8s.io/kubernetes (Go): affected from 1.33.0-alpha.0; fixed in 1.33.4

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-2025-5187/ (Markdown: https://insights.sbomify.com/CVE-2025-5187/index.md)
```

## Sources

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

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