☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
[ VENDOR STATS ]
CVSS: 6.7 🐛 CWE-863
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2025-5187

CVE-2025-5187 Privilege Escalation in Kubernetes
📅 PUBLISHED: 2025-08-27 16:20 UTC 🔄 UPDATED: 2026-10-02 19:33 UTC
[ OFFICIAL PATCH DEPLOYED ↓ ] FIX: CONFIRMED — 3+ independent sources confirm fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.55%
👁️
0.55% probability
13.8× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
Patch available — upgrade to latest release
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
6.7
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2025-5187 is a privilege escalation vulnerability in the Kubernetes NodeRestriction admission controller. An authenticated node user can delete their own node object by setting an OwnerReference to a cluster-scoped resource (e.g., a ClusterRole or Namespace). If that referenced resource does not exist or is later deleted, Kubernetes garbage collection will remove the node object. This allows a compromised node to effectively self-destruct, evading monitoring and disrupting cluster operations. The vulnerability has a CVSS score of 6.7 (Medium) and currently has no known patch or public exploit.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

This vulnerability is not related to a package manager (NPM, PyPI, Go, Ruby). It is a core Kubernetes admission controller issue. However, organizations using Kubernetes distributions (e.g., kubeadm, Rancher, OpenShift) should verify their vendor's patch status.

CVSS Breakdown & Threat Level

  • CVSS Score: 6.7 (Medium)
  • Vector: CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:H
  • Attack Vector: Local (requires node-level access)
  • Attack Complexity: Low
  • Privileges Required: High (node user)
  • User Interaction: None
  • Scope: Unchanged
  • Confidentiality Impact: None
  • Integrity Impact: High (node deletion)
  • Availability Impact: High (node deletion)

Threat Level: Medium. Exploitation requires node-level access, but the impact is significant—an attacker can delete a node, causing workload disruption and potentially covering tracks.

Deep Dive & Mechanics

The NodeRestriction admission controller is designed to limit what a node user (e.g., the kubelet) can modify. It prevents nodes from modifying other nodes or escalating privileges. However, CVE-2025-5187 bypasses this restriction by exploiting Kubernetes garbage collection.

Mechanism:

  1. An attacker with node-level access (e.g., via a compromised kubelet) patches their own node object to add an OwnerReference pointing to a cluster-scoped resource (e.g., a ClusterRole named nonexistent-role).
  2. The NodeRestriction controller does not validate the existence of the referenced resource, so the patch succeeds.
  3. If the referenced resource does not exist, or if it is later deleted, Kubernetes garbage collection automatically deletes the node object.
  4. The node is removed from the cluster, causing all pods on that node to be evicted and the node to become unavailable.

Root Cause: The NodeRestriction controller fails to check that the OwnerReference points to an existing resource. It also does not prevent node users from setting OwnerReference to cluster-scoped resources.

Vulnerable vs. Patched Code

Vulnerable Code (NodeRestriction admission controller):

// In the admission controller, when processing a node update:
if node.Spec.OwnerReferences != nil {
    // No validation of OwnerReference existence or scope
    // Allows any OwnerReference to be set
}

Patched Code (Hypothetical):

// Patched version should validate OwnerReference:
if node.Spec.OwnerReferences != nil {
    for _, ref := range node.Spec.OwnerReferences {
        // Check that the referenced resource exists and is namespaced
        if ref.APIVersion != "v1" || ref.Kind != "Node" {
            // Reject if not a namespaced resource
            return false, "OwnerReference must be to a namespaced resource"
        }
        // Verify resource exists
        _, err := client.Get(ref.APIVersion, ref.Kind, ref.Name)
        if err != nil {
            return false, "OwnerReference resource does not exist"
        }
    }
}

Exploitation & Lab Setup

Red Team (Attacker)

Prerequisites:

  • Node-level access (e.g., kubelet credentials or a pod with hostPID and hostNetwork).
  • Ability to patch the node object (requires nodes/update permission, which kubelet typically has).

Exploitation Steps:

  1. Obtain kubelet credentials or a token with node update permissions.
  2. Use kubectl or the Kubernetes API to patch the node object:
    kubectl patch node <node-name> -p '{"metadata":{"ownerReferences":[{"apiVersion":"rbac.authorization.k8s.io/v1","kind":"ClusterRole","name":"nonexistent-role","uid":"fake-uid"}]}}'
    
  3. The node will be deleted by garbage collection within minutes (default GC interval is 5 minutes).
  4. Alternatively, if the referenced resource exists, delete it to trigger GC:
    kubectl delete clusterrole nonexistent-role
    

Expected Outcome: The node is removed from the cluster, and all pods on it are evicted.

Blue Team (Defender)

Detection:

  • Monitor for node object patches that add OwnerReference fields.
  • Alert on any node deletion events that are not initiated by an administrator.
  • Use admission webhooks to block OwnerReference patches on node objects.

Mitigation:

  • Restrict node update permissions to only necessary users.
  • Enable audit logging for node modifications.
  • Implement a mutating admission webhook that validates OwnerReference on node objects.

Indicators of Compromise (IOCs)

  • Node Object Patch: A node object with an OwnerReference to a cluster-scoped resource (e.g., ClusterRole, ClusterRoleBinding, Namespace).
  • Node Deletion Event: A node deletion event without a corresponding kubectl delete node command.
  • Audit Log Entry: API audit logs showing a node patch with ownerReferences field.
  • Garbage Collection Activity: Increased GC activity in the controller manager logs.

Detection Engineering

YARA Rule

rule CVE_2025_5187_NodeOwnerRef
{
    meta:
        description = "Detects Kubernetes node objects with OwnerReference to cluster-scoped resources"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2025-5187"
    strings:
        $owner_ref = /"ownerReferences":\s*\[[^\]]*"apiVersion":\s*"[^"]*rbac\.authorization\.k8s\.io\/v1"/
        $cluster_scope = /"kind":\s*"(ClusterRole|ClusterRoleBinding|Namespace)"/
    condition:
        $owner_ref and $cluster_scope
}

Sigma Rule

title: Kubernetes Node Object OwnerReference Patch
id: 8a3f2c1e-5d7b-4a9c-8e6f-2b1d3c4a5e6f
status: experimental
description: Detects patching of a node object with an OwnerReference to a cluster-scoped resource
author: Valters IT
date: 2025-04-10
references:
    - https://nvd.nist.gov/vuln/detail/CVE-2025-5187
logsource:
    product: kubernetes
    service: audit
detection:
    selection:
        verb: patch
        objectRef.resource: nodes
        objectRef.subresource: ""
        responseStatus.code: 200
        requestObject.ownerReferences: exists
    condition: selection
falsepositives:
    - Legitimate node maintenance by cluster administrators
level: high

Suricata Rule

alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-5187 Kubernetes Node OwnerReference Patch"; flow:to_server,established; content:"PATCH"; http_method; content:"/api/v1/nodes/"; http_uri; content:"ownerReferences"; http_client_body; classtype:attempted-admin; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Restrict Node Update Permissions: Ensure only the kubelet and authorized administrators can update node objects. Use RBAC to limit nodes/update to specific service accounts.
  2. Enable Admission Webhooks: Deploy a mutating admission webhook that blocks any OwnerReference patches on node objects.
  3. Monitor Audit Logs: Enable Kubernetes audit logging and alert on node patches with ownerReferences.

Long-Term Fix:

  • Apply the official patch from Kubernetes when available (currently UNKNOWN).
  • Upgrade to a patched version of Kubernetes (check vendor advisories).

Workaround:

  • Use a validating admission webhook to reject node patches that add OwnerReference to cluster-scoped resources.

Valters IT
Senior DevSecOps & Cyber Threat Intelligence Expert

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2025-5187/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.