Kubernetes Pods API Discovery & Remote Code Execution

漏洞信息

漏洞名称: Kubernetes Pods API Discovery & Remote Code Execution

漏洞类型: 未授权访问

漏洞等级: 严重

漏洞描述: Kubernetes是一个开源的容器编排平台,广泛用于自动化部署、扩展和管理容器化应用。它支持多种部署场景,包括云环境、企业内部数据中心等,是现代DevOps实践中不可或缺的工具。该漏洞涉及Kubernetes Pods API的未授权访问问题,当服务端口暴露时,未经认证的攻击者可以利用此漏洞在容器内执行任意命令。漏洞的技术根源在于Kubernetes配置不当,未正确实施访问控制机制,导致API接口暴露给未授权用户。这种配置问题使得攻击者能够绕过正常的认证流程,直接与API交互。此漏洞的发现意味着,攻击者可以远程执行代码,可能导致数据泄露、服务中断或其他恶意活动。由于无需认证即可利用,该漏洞的风险等级被评定为严重。攻击者可以利用此漏洞自动化地进行攻击,对受影响的Kubernetes集群构成重大威胁。

产品厂商: Kubernetes

产品名称: Kubernetes

来源: https://github.com/zan8in/afrog/blob/2f6722015a76956b8f84dd0c2780c67e9e933ae9/pocs%2Ftemp%2Fafrog-pocs%2Fvulnerability%2Fkubernetes-pods-api.yaml

类型: zan8in/afrog:github commit

POC详情

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29

id: kubernetes-pods-api

info:
name: Kubernetes Pods - API Discovery & Remote Code Execution
author: ilovebinbash,geeknik,0xtavian
severity: critical
description: |-
A Kubernetes Pods API was discovered. When the service port is available, unauthenticated users can execute commands inside the container.
reference:
- https://github.com/officialhocc/Kubernetes-Kubelet-RCE
- https://blog.binaryedge.io/2018/12/06/kubernetes-being-hijacked-worldwide/
tags: k8,unauth,kubernetes,devops,misconfig
created: 2025/07/14

rules:
r0:
request:
method: GET
path: /pods
expression: response.status == 200 && response.headers["content-type"].contains("application/json") && response.body.bcontains(b'apiVersion')
r1:
request:
method: GET
path: /api/v1/pods
expression: response.status == 200 && response.headers["content-type"].contains("application/json") && response.body.bcontains(b'apiVersion')
expression: r0() || r1()



Kubernetes Pods API Discovery & Remote Code Execution
http://example.com/2025/07/17/github_2749715480/
作者
lianccc
发布于
2025年7月17日
许可协议